Skip to content

Commit

Permalink
Small fix on path sanitation function.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed May 13, 2024
1 parent abc0e1e commit 897048a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/rishka_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ inline double rishka_long_to_double(int64_t l) {
* @return A String containing the sanitized file path.
*/
inline String rishka_sanitize_path(String currentWorkingDirectory, char* path) {
if(strcmp(currentWorkingDirectory.c_str(), path) == 0)
return currentWorkingDirectory;

String segment, sanitizedPath = "",
fullPath = (currentWorkingDirectory == "/" ?
"" : currentWorkingDirectory) +
Expand Down

0 comments on commit 897048a

Please sign in to comment.