Skip to content

Commit

Permalink
Correct style
Browse files Browse the repository at this point in the history
  • Loading branch information
fpetrini15 committed Oct 30, 2024
1 parent 44eba7e commit d8d80c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/backend_common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1444,14 +1444,14 @@ GetOSValidPath(const std::string& path, std::string& ret_path)
{
std::string l_path(path);
#ifdef _WIN32
constexpr const char* WindowsLongPathPrefix = "\\\\?\\";
constexpr const char* kWindowsLongPathPrefix = "\\\\?\\";
// On Windows long paths must be marked correctly otherwise, due to backwards
// compatibility, all paths are limited to MAX_PATH length
if (l_path.size() >= MAX_PATH) {
// Must be prefixed with "\\?\" to be considered long path
if (l_path.substr(0, 4) != (WindowsLongPathPrefix)) {
if (l_path.substr(0, 4) != (kWindowsLongPathPrefix)) {
// Long path but not "tagged" correctly
l_path = (WindowsLongPathPrefix) + l_path;
l_path = (kWindowsLongPathPrefix) + l_path;
}
}
std::replace(l_path.begin(), l_path.end(), '/', '\\');
Expand Down

0 comments on commit d8d80c6

Please sign in to comment.