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

Unified Diff: base/file_util_win.cc

Issue 6402: Fix some problems with machine level install. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 3 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 | « base/file_util.h ('k') | chrome/installer/setup/install.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/file_util_win.cc
===================================================================
--- base/file_util_win.cc (revision 2671)
+++ base/file_util_win.cc (working copy)
@@ -365,6 +365,13 @@
return SUCCEEDED(result);
}
+bool IsDirectoryEmpty(const std::wstring& dir_path) {
+ FileEnumerator files(dir_path, false, FileEnumerator::FILES_AND_DIRECTORIES);
+ if (files.Next().empty())
+ return true;
+ return false;
+}
+
bool GetTempDir(std::wstring* path) {
wchar_t temp_path[MAX_PATH + 1];
DWORD path_len = ::GetTempPath(MAX_PATH, temp_path);
« no previous file with comments | « base/file_util.h ('k') | chrome/installer/setup/install.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698