summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/download_file.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/download/download_file.cc')
-rw-r--r--chrome/browser/download/download_file.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/browser/download/download_file.cc b/chrome/browser/download/download_file.cc
index 4fa3637..6b0fba4 100644
--- a/chrome/browser/download/download_file.cc
+++ b/chrome/browser/download/download_file.cc
@@ -578,3 +578,9 @@ void DownloadFileManager::CreateDirectory(const std::wstring& directory) {
if (!file_util::PathExists(directory))
file_util::CreateDirectory(directory);
}
+
+void DownloadFileManager::DeleteFile(const std::wstring& path) {
+ // Make sure we only delete files.
+ if (file_util::PathExists(path) && !file_util::DirectoryExists(path))
+ file_util::Delete(path, false);
+}