summaryrefslogtreecommitdiffstats
path: root/chrome/browser/shell_integration_linux.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/shell_integration_linux.cc')
-rw-r--r--chrome/browser/shell_integration_linux.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/shell_integration_linux.cc b/chrome/browser/shell_integration_linux.cc
index 19d1730..3c87350 100644
--- a/chrome/browser/shell_integration_linux.cc
+++ b/chrome/browser/shell_integration_linux.cc
@@ -139,13 +139,15 @@ void CreateShortcutOnDesktop(const FilePath& shortcut_filename,
O_CREAT | O_EXCL | O_WRONLY,
S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
if (fd < 0) {
- HANDLE_EINTR(close(desktop_fd));
+ if (HANDLE_EINTR(close(desktop_fd)) < 0)
+ PLOG(ERROR) << "close";
return;
}
ssize_t bytes_written = file_util::WriteFileDescriptor(fd, contents.data(),
contents.length());
- HANDLE_EINTR(close(fd));
+ if (HANDLE_EINTR(close(fd)) < 0)
+ PLOG(ERROR) << "close";
if (bytes_written != static_cast<ssize_t>(contents.length())) {
// Delete the file. No shortuct is better than corrupted one. Use unlinkat
@@ -155,7 +157,8 @@ void CreateShortcutOnDesktop(const FilePath& shortcut_filename,
unlinkat(desktop_fd, shortcut_filename.value().c_str(), 0);
}
- HANDLE_EINTR(close(desktop_fd));
+ if (HANDLE_EINTR(close(desktop_fd)) < 0)
+ PLOG(ERROR) << "close";
}
void CreateShortcutInApplicationsMenu(const FilePath& shortcut_filename,