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 /base/file_util.h | |
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 'base/file_util.h')
-rw-r--r-- | base/file_util.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/base/file_util.h b/base/file_util.h index fb7a739..489cbcc 100644 --- a/base/file_util.h +++ b/base/file_util.h @@ -95,7 +95,7 @@ std::wstring GetDirectoryFromPath(const std::wstring& path); void AppendToPath(std::wstring* path, const std::wstring& new_ending); // Convert provided relative path into an absolute path. Returns false on -// error. +// error. On POSIX, this function fails if the path does not exist. bool AbsolutePath(FilePath* path); // Deprecated temporary compatibility function. bool AbsolutePath(std::wstring* path); |