rely on some properties of fuse to avoid checks and sanitizing

This commit is contained in:
josch
2014-09-29 10:53:34 +02:00
parent fc520c6f5b
commit d65f60ec81
3 changed files with 118 additions and 38 deletions

View File

@@ -567,6 +567,19 @@ bool folder_tree_path_is_root(folder_tree * tree, const char *path)
}
}
bool folder_tree_path_is_file(folder_tree * tree, const char *path)
{
struct h_entry *result;
result = folder_tree_lookup_path(tree, path);
if (result != NULL) {
return result->atime != 0;
} else {
return false;
}
}
bool folder_tree_path_is_directory(folder_tree * tree, const char *path)
{
struct h_entry *result;