summaryrefslogtreecommitdiffstats
path: root/base/file_util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/file_util.cc')
-rw-r--r--base/file_util.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/base/file_util.cc b/base/file_util.cc
index 37adb04..d3a989b5 100644
--- a/base/file_util.cc
+++ b/base/file_util.cc
@@ -294,6 +294,13 @@ bool ReadFileToString(const std::wstring& path, std::string* contents) {
return ReadFileToString(FilePath::FromWStringHack(path), contents);
}
+bool AbsolutePath(std::wstring* path_str) {
+ FilePath path(FilePath::FromWStringHack(*path_str));
+ if (!AbsolutePath(&path))
+ return false;
+ *path_str = path.ToWStringHack();
+ return true;
+}
void AppendToPath(std::wstring* path, const std::wstring& new_ending) {
if (!path) {
NOTREACHED();