From 897048a569e9fdaf23a05f2c8abee8021b4d193c Mon Sep 17 00:00:00 2001 From: Nathanne Isip Date: Mon, 13 May 2024 22:26:54 +0800 Subject: [PATCH] Small fix on path sanitation function. --- src/rishka_util.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/rishka_util.h b/src/rishka_util.h index 0ded245..68580c6 100644 --- a/src/rishka_util.h +++ b/src/rishka_util.h @@ -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) +