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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user