mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-27 03:57:21 +00:00
Fix: on Windows, tiddlywiki.files title source shoud use / instead of \ (#7949)
* fix: on Windows, tiddlywiki.files title source shoud use / instead of \ * fix: split path.sep instead of /
This commit is contained in:
parent
94e0f05af5
commit
2b1efac6ee
@ -1967,10 +1967,10 @@ $tw.loadTiddlersFromSpecification = function(filepath,excludeRegExp) {
|
||||
var value = tiddler[name];
|
||||
switch(fieldInfo.source) {
|
||||
case "subdirectories":
|
||||
value = path.relative(rootPath, filename).split('/').slice(0, -1);
|
||||
value = path.relative(rootPath, filename).split(path.sep).slice(0, -1);
|
||||
break;
|
||||
case "filepath":
|
||||
value = path.relative(rootPath, filename);
|
||||
value = path.relative(rootPath, filename).split(path.sep).join('/');
|
||||
break;
|
||||
case "filename":
|
||||
value = path.basename(filename);
|
||||
|
Loading…
Reference in New Issue
Block a user