summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-10-20 15:08:50 +0200
committerRobin Gareus <robin@gareus.org>2015-10-20 15:50:00 +0200
commit740c4dd134ab0f1936ec3973f998afaaa4c43433 (patch)
tree2c6f2c9eb5402c69fe40d3c3c80e326f40d46c7b
parentaf3ffc8610ff66728f2e5313349f0f7a5c19981b (diff)
possible fix for invalid cleanup space calc on win32.
-rw-r--r--libs/pbd/file_utils.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/pbd/file_utils.cc b/libs/pbd/file_utils.cc
index 4279688157..6cf43f3fd2 100644
--- a/libs/pbd/file_utils.cc
+++ b/libs/pbd/file_utils.cc
@@ -450,13 +450,15 @@ remove_directory_internal (const string& dir, size_t* size, vector<string>* path
error << string_compose (_("cannot remove path %1 (%2)"), *i, strerror (errno))
<< endmsg;
ret = 1;
+ continue;
}
if (paths) {
paths->push_back (Glib::path_get_basename(*i));
}
- if (size) {
+ // statbuf.st_size is off_t
+ if (size && statbuf.st_size > 0) {
*size += statbuf.st_size;
}