summaryrefslogtreecommitdiffstats
path: root/base/file_util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/file_util.cc')
-rw-r--r--base/file_util.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/base/file_util.cc b/base/file_util.cc
index f0d66b5..fe33c32 100644
--- a/base/file_util.cc
+++ b/base/file_util.cc
@@ -381,11 +381,7 @@ std::wstring GetFilenameFromPath(const std::wstring& path) {
if (path.empty() || EndsWithSeparator(path))
return std::wstring();
-#if defined(OS_WIN)
- return FilePath::FromWStringHack(path).BaseName();
-#elif defined(OS_POSIX)
- return UTF8ToWide(FilePath::FromWStringHack(path).BaseName());
-#endif
+ return FilePath::FromWStringHack(path).BaseName().ToWStringHack();
}
bool GetFileSize(const std::wstring& file_path, int64* file_size) {
return GetFileSize(FilePath::FromWStringHack(file_path), file_size);