Index: src/libchengine/TLocalFilesystem.cpp =================================================================== diff -u -r055f6d7f37ede5386d39c2ca99a5412ab8464b48 -rd91802d51f8b5f47db18237eb8647839d64d088d --- src/libchengine/TLocalFilesystem.cpp (.../TLocalFilesystem.cpp) (revision 055f6d7f37ede5386d39c2ca99a5412ab8464b48) +++ src/libchengine/TLocalFilesystem.cpp (.../TLocalFilesystem.cpp) (revision d91802d51f8b5f47db18237eb8647839d64d088d) @@ -341,19 +341,30 @@ TSmartPath TLocalFilesystem::PrependPathExtensionIfNeeded(const TSmartPath& pathInput) { - const TSmartPath pathPrefix = PathFromString(L"\\\\?\\"); + if(pathInput.IsNetworkPath()) + { + const TSmartPath pathNetPrefix = PathFromString(L"\\\\?\\UNC\\"); + if(!pathInput.StartsWith(pathNetPrefix)) + return pathNetPrefix + PathFromWString(pathInput.ToWString().Mid(1)); + } + else + { + const TSmartPath pathPrefix = PathFromString(L"\\\\?\\"); + if(!pathInput.StartsWith(pathPrefix)) + return pathPrefix + pathInput; + } - if (!pathInput.StartsWith(pathPrefix)) - return pathPrefix + pathInput; - return pathInput; } TSmartPath TLocalFilesystem::StripPathExtensionIfNeeded(const TSmartPath& pathInput) { const TSmartPath pathPrefix = PathFromString(L"\\\\?\\"); + const TSmartPath pathNetPrefix = PathFromString(L"\\\\?\\UNC\\"); - if(pathInput.StartsWith(pathPrefix)) + if(pathInput.StartsWith(pathNetPrefix)) + return PathFromString(pathInput.ToWString().Mid(pathNetPrefix.GetLength()).c_str()); + else if(pathInput.StartsWith(pathPrefix)) return PathFromString(pathInput.ToWString().Mid(pathPrefix.GetLength()).c_str()); return pathInput; Index: src/libchengine/TLocalFilesystem.h =================================================================== diff -u -r32e9c223239ddbe4055bf468e92efe33f90f5f94 -rd91802d51f8b5f47db18237eb8647839d64d088d --- src/libchengine/TLocalFilesystem.h (.../TLocalFilesystem.h) (revision 32e9c223239ddbe4055bf468e92efe33f90f5f94) +++ src/libchengine/TLocalFilesystem.h (.../TLocalFilesystem.h) (revision d91802d51f8b5f47db18237eb8647839d64d088d) @@ -47,7 +47,7 @@ explicit TLocalFilesystem(const logger::TLogFileDataPtr& spLogFileData); TLocalFilesystem(const TLocalFilesystem&) = delete; - virtual ~TLocalFilesystem(); + ~TLocalFilesystem() override; TLocalFilesystem& operator=(const TLocalFilesystem&) = delete;