From 6cbc448f63f16bf660d590306b666ecac0d3d85c Mon Sep 17 00:00:00 2001 From: Scott Gilbertson Date: Mon, 15 Jan 2024 17:13:40 -0500 Subject: [PATCH] Handle Samba-style UNC prefix '//' in %p and %P queue output template specifiers --- rtgui/batchqueue.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rtgui/batchqueue.cc b/rtgui/batchqueue.cc index 53d31d76b..e7de30d30 100644 --- a/rtgui/batchqueue.cc +++ b/rtgui/batchqueue.cc @@ -76,12 +76,16 @@ namespace // local helper functions // Extract the initial characters from a canonical absolute path, and append // those to a path string. Initial characters are '/' for Unix/Linux paths and - // '\\' for UNC paths. A single backslash is also accepted, for driveless + // '\\' or '//' for UNC paths. A single backslash is also accepted, for driveless // Windows paths. void appendAbsolutePathPrefix(Glib::ustring& path, const Glib::ustring& absolutePath) { if (absolutePath[0] == '/') { - path += '/'; // Start of a Unix/Linux path + if (absolutePath.size() > 1 && absolutePath[1] == '/') { + path += "//"; // Start of a Samba UNC path + } else { + path += '/'; // Start of a Unix/Linux path + } } else if (absolutePath[0] == '\\') { if (absolutePath.size() > 1 && absolutePath[1] == '\\') { path += "\\\\"; // Start of a UNC path