From 9579203a99a98068dee82c3e1d511dfaf720c040 Mon Sep 17 00:00:00 2001 From: johenning Date: Sat, 26 Aug 2017 15:55:00 +0200 Subject: [PATCH] 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. --- rtgui/batchqueue.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/rtgui/batchqueue.cc b/rtgui/batchqueue.cc index da042347d..03cc9535c 100644 --- a/rtgui/batchqueue.cc +++ b/rtgui/batchqueue.cc @@ -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]); }