projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e73bdba
)
Fix failure to load DCPs from SMB shares (#2123).
author
Carl Hetherington
<cth@carlh.net>
Sat, 13 Nov 2021 22:42:46 +0000
(23:42 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Sat, 13 Nov 2021 23:18:49 +0000
(
00:18
+0100)
src/lib/cross_windows.cc
patch
|
blob
|
history
diff --git
a/src/lib/cross_windows.cc
b/src/lib/cross_windows.cc
index b3d9a1558add1fbd2f7e70a74a23b2017accc985..a425186f1816d88cf4b3559ad64c1514245a8b12 100644
(file)
--- a/
src/lib/cross_windows.cc
+++ b/
src/lib/cross_windows.cc
@@
-255,14
+255,17
@@
fix_long_path (boost::filesystem::path long_path)
{
using namespace boost::filesystem;
{
using namespace boost::filesystem;
- path fixed = "\\\\?\\";
- if (boost::algorithm::starts_with(long_path.string(), fixed.string())) {
+ if (boost::algorithm::starts_with(long_path.string(), "\\\\")) {
+ /* This could mean it starts with \\ (i.e. a SMB path) or \\?\ (a long path)
+ * or a variety of other things... anyway, we'll leave it alone.
+ */
return long_path;
}
/* We have to make the path canonical but we can't call canonical() on the long path
* as it will fail. So we'll sort of do it ourselves (possibly badly).
*/
return long_path;
}
/* We have to make the path canonical but we can't call canonical() on the long path
* as it will fail. So we'll sort of do it ourselves (possibly badly).
*/
+ path fixed = "\\\\?\\";
if (long_path.is_absolute()) {
fixed += long_path.make_preferred();
} else {
if (long_path.is_absolute()) {
fixed += long_path.make_preferred();
} else {