| Index: chrome/browser/web_applications/web_app_mac.mm
|
| diff --git a/chrome/browser/web_applications/web_app_mac.mm b/chrome/browser/web_applications/web_app_mac.mm
|
| index 2c6154800a6a4b4f57b95639328c727be7316053..b58e8f85ddaa9add7f7c889fffe8cc8a5174398e 100644
|
| --- a/chrome/browser/web_applications/web_app_mac.mm
|
| +++ b/chrome/browser/web_applications/web_app_mac.mm
|
| @@ -85,6 +85,8 @@ bool AddBitmapImageRepToIconFamily(IconFamily* icon_family,
|
|
|
| namespace web_app {
|
|
|
| +const char kChromeAppDirName[] = "Chrome Apps.localized";
|
| +
|
| WebAppShortcutCreator::WebAppShortcutCreator(
|
| const base::FilePath& user_data_dir,
|
| const ShellIntegration::ShortcutInfo& shortcut_info,
|
| @@ -120,6 +122,15 @@ bool WebAppShortcutCreator::CreateShortcut() {
|
| return false;
|
|
|
| base::FilePath dst_path = GetDestinationPath(app_file_name);
|
| + if (dst_path.empty()) {
|
| + LOG(ERROR) << "Couldn't find an Applications directory to copy app to.";
|
| + return false;
|
| + }
|
| + dst_path = dst_path.Append(kChromeAppDirName);
|
| + if (!file_util::CreateDirectory(dst_path)) {
|
| + LOG(ERROR) << "Creating directory " << dst_path.value() << " failed.";
|
| + return false;
|
| + }
|
| if (!file_util::CopyDirectory(staging_path, dst_path, true)) {
|
| LOG(ERROR) << "Copying app to dst path: " << dst_path.value() << " failed";
|
| return false;
|
|
|