summaryrefslogtreecommitdiffstats
path: root/base/file_util_win.cc
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-06 18:08:34 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-06 18:08:34 +0000
commit561abe688fc5ebcec902ea6cc2ccb4122441595e (patch)
tree5d5b001676b82c824d22619f0cc3a92b22648ab2 /base/file_util_win.cc
parent5ce729688e2b16ebc97decb032175ba230855c1d (diff)
downloadchromium_src-561abe688fc5ebcec902ea6cc2ccb4122441595e.zip
chromium_src-561abe688fc5ebcec902ea6cc2ccb4122441595e.tar.gz
chromium_src-561abe688fc5ebcec902ea6cc2ccb4122441595e.tar.bz2
First pass of refactoring dialogs.
Review URL: http://codereview.chromium.org/60110 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13168 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util_win.cc')
-rw-r--r--base/file_util_win.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/base/file_util_win.cc b/base/file_util_win.cc
index 45c0afde..841cd28 100644
--- a/base/file_util_win.cc
+++ b/base/file_util_win.cc
@@ -240,6 +240,13 @@ bool GetFileCreationLocalTime(const std::wstring& filename,
}
bool ResolveShortcut(std::wstring* path) {
+ FilePath file_path(*path);
+ bool result = ResolveShortcut(&file_path);
+ *path = file_path.value();
+ return result;
+}
+
+bool ResolveShortcut(FilePath* path) {
HRESULT result;
IShellLink *shell = NULL;
bool is_resolved = false;
@@ -256,14 +263,14 @@ bool ResolveShortcut(std::wstring* path) {
if (SUCCEEDED(result)) {
WCHAR temp_path[MAX_PATH];
// Load the shell link
- result = persist->Load(path->c_str(), STGM_READ);
+ result = persist->Load(path->value().c_str(), STGM_READ);
if (SUCCEEDED(result)) {
// Try to find the target of a shortcut
result = shell->Resolve(0, SLR_NO_UI);
if (SUCCEEDED(result)) {
result = shell->GetPath(temp_path, MAX_PATH,
NULL, SLGP_UNCPRIORITY);
- *path = temp_path;
+ *path = FilePath(temp_path);
is_resolved = true;
}
}