-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
move special_folder into rsutils #12417
Conversation
Should I just include the followup in this PR? :) |
CHECK_HR( SHGetFolderPathA( NULL, CSIDL_PERSONAL, NULL, 0, path ) ); | ||
res = path; | ||
res += "\\"; | ||
return res; |
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.
I don't like the return
here, it is not obvious.
If this is a special case that needs different handling then do it in an if
like the temp folder
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.
Ahh, I see the code was moved from another location. Still, consider changing...
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.
Changed.
namespace os { | ||
|
||
|
||
std::string get_special_folder( special_folder f ) |
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.
Rename get_special_folder_path
, it does not return a descriptor or such like.
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 returns a "folder". I don't know if I understand the connection to a descriptor.
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 returns a string that represents the folder path in the file system. It does not return a folder "object".
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 there is no such object. Why does it have to be an object? A folder is represented by a path which is represented by a string, almost universally.
10b9d18
to
7e74b88
Compare
First step of persistent DDS settings.
Moved it to rsutils (first commit).
Made behavior consistent for all cases, and removed Windows warnings about insecure function. (second commit, so you can see the actual changes)
Tracked on [LRS-960]