I really hope this is the last time we fix Location Picker, i think it's good it's pretty elegant, basically set root and location path to never have / at end and that made things easier

This commit is contained in:
Me
2022-08-11 02:01:24 +02:00
9 changed files with 82 additions and 241 deletions

View File

@@ -117,16 +117,16 @@ int path_is_valid(std::string path)
if (S_ISREG(s.st_mode))
{
// std::cout << "is a file\n";
return (2);
return (IS_FILE);
}
else if (S_ISDIR(s.st_mode))
{
// std::cout << "is a Dir\n";
return (1);
return (IS_DIR);
}
}
// std::cout << "path is neither dir nor file\n";
return (0);
return (IS_OTHER);
}