mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-06-25 23:03:15 +00:00
Don't generate filenames starting with a period
This commit is contained in:
parent
08c900786e
commit
86286c6fce
|
@ -266,6 +266,8 @@ exports.generateTiddlerFilepath = function(title,options) {
|
||||||
// Remove any forward or backward slashes so we don't create directories
|
// Remove any forward or backward slashes so we don't create directories
|
||||||
filepath = filepath.replace(/\/|\\/g,"_");
|
filepath = filepath.replace(/\/|\\/g,"_");
|
||||||
}
|
}
|
||||||
|
// Don't let the filename start with a dot because such files are invisible on *nix
|
||||||
|
filepath = filepath.replace(/^\./g,"_");
|
||||||
// Remove any characters that can't be used in cross-platform filenames
|
// Remove any characters that can't be used in cross-platform filenames
|
||||||
filepath = $tw.utils.transliterate(filepath.replace(/<|>|\:|\"|\||\?|\*|\^/g,"_"));
|
filepath = $tw.utils.transliterate(filepath.replace(/<|>|\:|\"|\||\?|\*|\^/g,"_"));
|
||||||
// Truncate the filename if it is too long
|
// Truncate the filename if it is too long
|
||||||
|
|
Loading…
Reference in New Issue
Block a user