File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 2828#if defined(OS_WIN)
2929#include " base/strings/utf_string_conversions.h"
3030#include " base/files/file_path.h"
31+ #include " base/files/file_util.h"
3132#include " base/win/shortcut.h"
3233#include " base/path_service.h"
3334#include " content/nw/src/common/shell_switches.h"
@@ -162,7 +163,10 @@ void App::Call(Shell* shell,
162163 base::FilePath processPath;
163164 PathService::Get (base::FILE_EXE, &processPath);
164165 props.set_target (processPath);
165- result->AppendBoolean (base::win::CreateOrUpdateShortcutLink (base::FilePath (path), props, base::win::SHORTCUT_CREATE_ALWAYS));
166+
167+ base::FilePath shortcutPath (path);
168+ result->AppendBoolean (base::win::CreateOrUpdateShortcutLink (shortcutPath, props,
169+ base::PathExists (shortcutPath) ? base::win::SHORTCUT_UPDATE_EXISTING : base::win::SHORTCUT_CREATE_ALWAYS));
166170#else
167171 result->AppendBoolean (false );
168172#endif
You can’t perform that action at this time.
0 commit comments