[Liblas-commits] hg-main-tree: harden

liblas-commits at liblas.org liblas-commits at liblas.org
Wed Apr 27 15:12:15 EDT 2011


details:   http://hg.libpc.orghg-main-tree/rev/e4aa6285ff37
changeset: 682:e4aa6285ff37
user:      Michael P. Gerlek <mpg at flaxen.com>
date:      Wed Apr 27 12:12:07 2011 -0700
description:
harden

diffstat:

 src/Utils.cpp |  5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diffs (15 lines):

diff -r 1d45396b90a8 -r e4aa6285ff37 src/Utils.cpp
--- a/src/Utils.cpp	Wed Apr 27 11:51:08 2011 -0700
+++ b/src/Utils.cpp	Wed Apr 27 12:12:07 2011 -0700
@@ -143,7 +143,10 @@
 
 bool Utils::deleteFile(const std::string& file)
 {
-  return boost::filesystem::remove(file);
+    if (!fileExists(file))
+        return false;
+        
+    return boost::filesystem::remove(file);
 }
 
 


More information about the Liblas-commits mailing list