Index: chrome/browser/extensions/path_util.cc |
diff --git a/chrome/browser/extensions/path_util.cc b/chrome/browser/extensions/path_util.cc |
index 429f9e4438759217bb484e8b0e09260e73dc021f..37ccd745fab4b0296640883338e10f5b24f95ebe 100644 |
--- a/chrome/browser/extensions/path_util.cc |
+++ b/chrome/browser/extensions/path_util.cc |
@@ -42,6 +42,8 @@ std::string GetDisplayBaseName(const base::FilePath& path) { |
} // namespace |
base::FilePath PrettifyPath(const base::FilePath& source_path) { |
not at google - send to devlin
2014/08/04 23:39:07
declare this function then do the empty-path check
|
+ if (source_path.empty()) |
+ return base::FilePath(); |
base::FilePath home_path; |
PathService::Get(base::DIR_HOME, &home_path); |
DCHECK(source_path.IsAbsolute()); |
@@ -71,6 +73,8 @@ base::FilePath PrettifyPath(const base::FilePath& source_path) { |
} |
#else // defined(OS_MACOSX) |
base::FilePath PrettifyPath(const base::FilePath& source_path) { |
+ if (source_path.empty()) |
+ return base::FilePath(); |
base::FilePath home_path; |
base::FilePath display_path = base::FilePath::FromUTF8Unsafe("~"); |
if (PathService::Get(base::DIR_HOME, &home_path) && |