Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4031)

Unified Diff: base/file_util.h

Issue 10690047: Fix a bug in file_util::Delete() where symlinks are not handled right (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync & add comment Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/file_util_posix.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util.h
diff --git a/base/file_util.h b/base/file_util.h
index 1eac1caa9975e3f2247859a9dfce562e3a46de21..53eefcc4de1f2a71bb316a44bf97240dd70052dc 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -100,6 +100,9 @@ BASE_EXPORT int64 ComputeFilesSize(const FilePath& directory,
// subdirectories and their contents as well.
// Returns true if successful, false otherwise.
//
+// In posix environment and if |path| is a symbolic link, this deletes only
+// the symlink. (even if the symlink deferences to a non-existent file)
+//
// WARNING: USING THIS WITH recursive==true IS EQUIVALENT
// TO "rm -rf", SO USE WITH CAUTION.
BASE_EXPORT bool Delete(const FilePath& path, bool recursive);
« no previous file with comments | « no previous file | base/file_util_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698