mirror of
https://github.com/leanote/desktop-app.git
synced 2025-10-19 18:14:15 +00:00
export fix path for windows
This commit is contained in:
7
node_modules/common.js
generated
vendored
7
node_modules/common.js
generated
vendored
@@ -142,6 +142,7 @@ var Common = {
|
|||||||
},
|
},
|
||||||
// 拆分filePath的各个部分
|
// 拆分filePath的各个部分
|
||||||
splitFile: function(fullFilePath) {
|
splitFile: function(fullFilePath) {
|
||||||
|
var pme = this;
|
||||||
var ret = {
|
var ret = {
|
||||||
path: "", // a/b
|
path: "", // a/b
|
||||||
name: "", // c.js
|
name: "", // c.js
|
||||||
@@ -151,9 +152,9 @@ var Common = {
|
|||||||
var me = this;
|
var me = this;
|
||||||
if(me.path) {
|
if(me.path) {
|
||||||
if(me.ext) {
|
if(me.ext) {
|
||||||
return me.path + '/' + me.nameNotExt + '.' + me.ext;
|
return me.path + pme.getPathSep() + me.nameNotExt + '.' + me.ext;
|
||||||
} else {
|
} else {
|
||||||
return me.path + '/' + me.nameNotExt;
|
return me.path + pme.getPathSep() + me.nameNotExt;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(me.ext) {
|
if(me.ext) {
|
||||||
@@ -173,7 +174,7 @@ var Common = {
|
|||||||
} else {
|
} else {
|
||||||
ret.name = strs[strs.length - 1];
|
ret.name = strs[strs.length - 1];
|
||||||
strs.pop();
|
strs.pop();
|
||||||
ret.path = strs.join('/');
|
ret.path = strs.join(pme.getPathSep());
|
||||||
}
|
}
|
||||||
// console.log("---");
|
// console.log("---");
|
||||||
// console.log(ret);
|
// console.log(ret);
|
||||||
|
@@ -312,7 +312,7 @@ define(function() {
|
|||||||
var name = note.Title ? note.Title + '.html' : getMsg('Untitled') + '.html';
|
var name = note.Title ? note.Title + '.html' : getMsg('Untitled') + '.html';
|
||||||
name = me.fixFilename(name);
|
name = me.fixFilename(name);
|
||||||
|
|
||||||
var targetPath = path + '/' + name;
|
var targetPath = path + Api.commonService.getPathSep() + name;
|
||||||
|
|
||||||
// 将路径和名字区分开
|
// 将路径和名字区分开
|
||||||
var pathInfo = Api.commonService.splitFile(targetPath);
|
var pathInfo = Api.commonService.splitFile(targetPath);
|
||||||
|
@@ -287,7 +287,7 @@ define(function() {
|
|||||||
var name = note.Title ? note.Title + '.pdf' : getMsg('Untitled') + '.pdf';
|
var name = note.Title ? note.Title + '.pdf' : getMsg('Untitled') + '.pdf';
|
||||||
name = me.fixFilename(name);
|
name = me.fixFilename(name);
|
||||||
|
|
||||||
var targetPath = path + '/' + name;
|
var targetPath = path + Api.commonService.getPathSep() + name;
|
||||||
|
|
||||||
// 将路径和名字区分开
|
// 将路径和名字区分开
|
||||||
var pathInfo = Api.commonService.splitFile(targetPath);
|
var pathInfo = Api.commonService.splitFile(targetPath);
|
||||||
|
Reference in New Issue
Block a user