Verified Commit 16a245b5 authored by Tommaso Tocci's avatar Tommaso Tocci
Browse files

Remove data only for regular file

parent e1d9b3ec
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -134,7 +134,8 @@ int adafs_rm_node(const std::string& path) {
    if (!md) {
        return -1;
    }
    return rpc_send_rm_node(path, (md->size() == 0));
    bool has_data = S_ISREG(md->mode()) && (md->size() != 0);
    return rpc_send_rm_node(path, !has_data);
}

int adafs_access(const std::string& path, const int mask) {