summaryrefslogtreecommitdiffstats
path: root/base/file_util.h
diff options
context:
space:
mode:
authorskerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-09 22:56:48 +0000
committerskerner@chromium.org <skerner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-09 22:56:48 +0000
commit6f5f4322d6688abd29d0253a6a8201fb7b1c103d (patch)
tree1ceb35e4715990b18b9f7f6327c5072f7a699fe4 /base/file_util.h
parenta53bb6f7db58fa59fb2dd3b6508b6acc0d1d44ad (diff)
downloadchromium_src-6f5f4322d6688abd29d0253a6a8201fb7b1c103d.zip
chromium_src-6f5f4322d6688abd29d0253a6a8201fb7b1c103d.tar.gz
chromium_src-6f5f4322d6688abd29d0253a6a8201fb7b1c103d.tar.bz2
Give the extension unpacker process a junction/symlink free path to the unpack directory.
BUG=35198,13044 TEST=FileUtilTest.NormalizeFilePathBasic,FileUtilTest. NormalizeFilePathReparsePoints,FileUtilTest.NormalizeFilePathSymlinks Review URL: http://codereview.chromium.org/2088006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49337 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util.h')
-rw-r--r--base/file_util.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/base/file_util.h b/base/file_util.h
index 414f775..04afdec 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -281,12 +281,13 @@ bool IsDot(const FilePath& path);
// Returns true if the given path's base name is "..".
bool IsDotDot(const FilePath& path);
-#if defined(OS_POSIX)
-// Set |real_path| to |path| with symbolic links expanded.
-// Windows support (expanding junctions) comming soon:
-// http://crbug.com/13044
-bool RealPath(const FilePath& path, FilePath* real_path);
-#endif
+// Sets |real_path| to |path| with symbolic links and junctions expanded.
+// On windows, make sure the path starts with a lettered drive.
+// |path| must reference a file. Function will fail if |path| points to
+// a directory or to a nonexistent path. On windows, this function will
+// fail if |path| is a junction or symlink that points to an empty file,
+// or if |real_path| would be longer than MAX_PATH characters.
+bool NormalizeFilePath(const FilePath& path, FilePath* real_path);
// Used to hold information about a given file path. See GetFileInfo below.
struct FileInfo {