-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Windows Long Paths #398
base: main
Are you sure you want to change the base?
Support for Windows Long Paths #398
Conversation
|
||
private: | ||
inline std::string getOSValidPath(const std::string& _path); | ||
const char* kWindowsLongPathPrefix = "\\\\?\\"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const char* kWindowsLongPathPrefix = "\\\\?\\"; | |
const char* windows_long_path_prefix_ = "\\\\?\\"; |
To match Triton member variable convention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But that's a constant, not a variable? AFAIK, constants should be named like the former, not the latter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be more idiomatic to use static constexpr char* kWindowsLongPathPrefix = "\\\\?\\";
to drive the fact this is, indeed, a constant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -60,12 +60,45 @@ class LocalFileSystem : public FileSystem { | |||
Status MakeTemporaryDirectory( | |||
std::string dir_path, std::string* temp_dir) override; | |||
Status DeletePath(const std::string& path) override; | |||
|
|||
private: | |||
inline std::string getOSValidPath(const std::string& _path); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inline std::string getOSValidPath(const std::string& _path); | |
inline std::string GetOSValidPath(const std::string& path); |
To match triton syntax conventions
//! https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry | ||
//! | ||
inline std::string | ||
LocalFileSystem::getOSValidPath(const std::string& _path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LocalFileSystem::getOSValidPath(const std::string& _path) | |
LocalFileSystem::getOSValidPath(const std::string& path) |
Cascading effect where the local path
variable will need to change to something like local_path
or l_path
Great work @ashishk98, just a few minor stylistic comments to be consistent with Triton. Also, to get this merged, I need two things:
|
Add support for windows long paths