Fixed double backslash case

If the first two symbols in the path are backslashes, we should not treat them like a single backslash, as one refers to root and the other to a network path.
This commit is contained in:
johenning
2017-08-26 15:55:00 +02:00
committed by GitHub
parent 29944a31c6
commit 9579203a99

View File

@@ -743,8 +743,15 @@ Glib::ustring BatchQueue::calcAutoFileNameBase (const Glib::ustring& origFileNam
da.push_back (tok);
}
if (origFileName[0] == '/' || origFileName[0] == '\\') {
if (origFileName[0] == '/') {
pa.push_back ("/" + da[0]);
} else if (origFileName[0] == '\\') {
if (origFileName[1] == '\\') {
pa.push_back ("\\\\" + da[0]);
}
else {
pa.push_back ("/" + da[0]);
}
} else {
pa.push_back (da[0]);
}