diff --git a/Utils.cpp b/Utils.cpp index b6c7bf8..102c09a 100644 --- a/Utils.cpp +++ b/Utils.cpp @@ -523,9 +523,7 @@ uint64_t GetTreeBytes(const std::string& path) { PLOG(WARNING) << "Failed to open " << path; return -1; } else { - uint64_t res = calculate_dir_size(dirfd); - close(dirfd); - return res; + return calculate_dir_size(dirfd); } }