fs: In FS::DeleteRecursive, check if the provided path is '/' and not the cwd (fixes #119)

This commit is contained in:
Joel16 2022-08-20 14:45:08 -04:00
parent e96caf2af4
commit 2b9a81189e

View File

@ -151,7 +151,7 @@ namespace FS {
continue;
std::string file_path = path;
file_path.append(cwd.compare("/") == 0? "" : "/");
file_path.append(path.compare("/") == 0? "" : "/");
file_path.append(filename);
if (entry->d_type & DT_DIR) {