diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-27 22:59:59 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-27 22:59:59 +0000 |
commit | 07dc5ffd9a5d10d55e2299651fe7a826d7fd7aba (patch) | |
tree | b70386669cadfae6e152f96afbfbd6129aca1950 /chrome | |
parent | b896d838926f0b8defa231665bae020b11a3dd7f (diff) | |
download | chromium_src-07dc5ffd9a5d10d55e2299651fe7a826d7fd7aba.zip chromium_src-07dc5ffd9a5d10d55e2299651fe7a826d7fd7aba.tar.gz chromium_src-07dc5ffd9a5d10d55e2299651fe7a826d7fd7aba.tar.bz2 |
POSIX: Make --user-data-dir work when it doesn't exist.
Previously, --user-data-dir called PathService::Override which called
AbsolutePath. On POSIX, this calls realpath and fails if the given
path doesn't actually exist.
We need to do this on Windows because we change the current directory
in order to load plugins (at least). However, on POSIX we shouldn't
ever change cwd.
So, on POSIX, don't try to make the user-data-dir absolute.
TEST=On POSIX, start chrome with --user-data-dir=/tmp/xyz (where xyz is a directory which doesn't exist). Once running, check that /tmp/xyz exists and contains the expected files.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14679 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/app/chrome_dll_main.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc index 023eeb1..1cb9e40 100644 --- a/chrome/app/chrome_dll_main.cc +++ b/chrome/app/chrome_dll_main.cc @@ -373,7 +373,7 @@ int ChromeMain(int argc, const char** argv) { const std::wstring user_data_dir = parsed_command_line.GetSwitchValue(switches::kUserDataDir); if (!user_data_dir.empty()) - PathService::Override(chrome::DIR_USER_DATA, user_data_dir); + CHECK(PathService::Override(chrome::DIR_USER_DATA, user_data_dir)); bool single_process = #if defined (GOOGLE_CHROME_BUILD) |