Repository navigation
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.
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.
Ahh, I see the code was moved from another location. Still, consider changing...
| namespace os { | ||
|
|
||
|
|
||
| std::string get_special_folder( special_folder f ) |
There was a problem hiding this comment.
Rename get_special_folder_path, it does not return a descriptor or such like.
There was a problem hiding this comment.
It returns a "folder". I don't know if I understand the connection to a descriptor.
There was a problem hiding this comment.
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.
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]