diff options
author | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-08 17:15:52 +0000 |
---|---|---|
committer | kuchhal@chromium.org <kuchhal@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-08 17:15:52 +0000 |
commit | 4b636fa73856bc6b58abc850e1d1095d6592581d (patch) | |
tree | 9f8c482963ef8bd41814c1e054804e3536ea2c95 /base/file_util_win.cc | |
parent | fa08c45a2b823aff04a34f720aff876288e0c9dd (diff) | |
download | chromium_src-4b636fa73856bc6b58abc850e1d1095d6592581d.zip chromium_src-4b636fa73856bc6b58abc850e1d1095d6592581d.tar.gz chromium_src-4b636fa73856bc6b58abc850e1d1095d6592581d.tar.bz2 |
Fix some problems with machine level install.
BUG=2380
Review URL: http://codereview.chromium.org/6402
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3015 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util_win.cc')
-rw-r--r-- | base/file_util_win.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/base/file_util_win.cc b/base/file_util_win.cc index fc53dc9..8253e53 100644 --- a/base/file_util_win.cc +++ b/base/file_util_win.cc @@ -365,6 +365,13 @@ bool UpdateShortcutLink(const wchar_t *source, const wchar_t *destination, 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); |