File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 1
1
// sktoolslib - common files for SK tools
2
2
3
- // Copyright (C) 2013-2015, 2017, 2020-2022 - Stefan Kueng
3
+ // Copyright (C) 2013-2015, 2017, 2020-2023 - Stefan Kueng
4
4
5
5
// This program is free software; you can redistribute it and/or
6
6
// modify it under the terms of the GNU General Public License
@@ -121,6 +121,17 @@ std::wstring CPathUtils::GetLongPathname(const std::wstring& path)
121
121
}
122
122
if (ret == 0 )
123
123
return path;
124
+ if (sRet .starts_with (' \\ ' ))
125
+ {
126
+ ret = GetFullPathName (sRet .c_str (), 0 , nullptr , nullptr );
127
+ if (ret)
128
+ {
129
+ auto fullPath = std::make_unique<wchar_t []>(ret + 2 );
130
+ ret = GetFullPathName (sRet .c_str (), ret + 1 , fullPath.get (), nullptr );
131
+ if (ret)
132
+ sRet = std::wstring (fullPath.get (), ret);
133
+ }
134
+ }
124
135
return sRet ;
125
136
}
126
137
You can’t perform that action at this time.
0 commit comments