summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorkinaba <kinaba@chromium.org>2014-10-20 22:43:34 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-21 05:44:22 +0000
commit6e0570b6c5c46a19d4b65847b39cc6a860157eba (patch)
tree022bf28817a0a9b0130175ecc759ec092e10c49b /apps
parentaf98f0fa02a4cfc584291ea27aecda165bbdaddb (diff)
downloadchromium_src-6e0570b6c5c46a19d4b65847b39cc6a860157eba.zip
chromium_src-6e0570b6c5c46a19d4b65847b39cc6a860157eba.tar.gz
chromium_src-6e0570b6c5c46a19d4b65847b39cc6a860157eba.tar.bz2
App launcher: Fix warning log on unresolvable relative paths.
In the current implementation, the helper function DoMakePathAbsolute may rewrite the input even in the case of failure, which makes the warning log less readable. BUG=none TEST=./chrome --app --app-id=someapp --enable-logging=stderr non/existing/path Review URL: https://codereview.chromium.org/665053002 Cr-Commit-Position: refs/heads/master@{#300424}
Diffstat (limited to 'apps')
-rw-r--r--apps/launcher.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/launcher.cc b/apps/launcher.cc
index a4272a6..50cdf5d 100644
--- a/apps/launcher.cc
+++ b/apps/launcher.cc
@@ -71,8 +71,11 @@ bool DoMakePathAbsolute(const base::FilePath& current_directory,
return true;
if (current_directory.empty()) {
- *file_path = base::MakeAbsoluteFilePath(*file_path);
- return !file_path->empty();
+ base::FilePath absolute_path = base::MakeAbsoluteFilePath(*file_path);
+ if (absolute_path.empty())
+ return false;
+ *file_path = absolute_path;
+ return true;
}
if (!current_directory.IsAbsolute())