Don't save a leading slash when storing a relative export path.
It is not needed in the relative case and causes issues when taking sessions between platforms. On windows, the default path would be "\export". When that is used on linux the resulting fullpath would end up as /your/session/path/\export which is then not found on the file system. This change is consistent with how relative paths are normally written and does cure the default path when moved across platforms. It does not solve the larger issue of mixed directory separators. A relative path of "export\myMixV1" will still fail when moving between platforms.
This commit is contained in:
parent
a18d9b9cb4
commit
9e6b85f330
@ -409,7 +409,8 @@ ExportFilename::analyse_folder ()
|
||||
|
||||
if (!folder_beginning.compare (session_dir)) {
|
||||
pair.first = true;
|
||||
pair.second = folder.substr (session_dir_len);
|
||||
// remove the leading slash if needed.
|
||||
pair.second = folder.substr (folder.length() > session_dir_len ? session_dir_len+1 : session_dir_len);
|
||||
} else {
|
||||
pair.first = false;
|
||||
pair.second = folder;
|
||||
|
Loading…
Reference in New Issue
Block a user