Browse Source

share: fix error handling when creating downloads path

bboozzoo/dbus-support-fileshare
Maciek Borzecki 8 years ago
parent
commit
6b8e5fa223
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      src/mconnect/share.vala

+ 5
- 5
src/mconnect/share.vala View File

@ -37,11 +37,11 @@ class ShareHandler : Object, PacketHandlerInterface {
ShareHandler.DOWNLOADS = Path.build_filename(
Environment.get_user_special_dir(UserDirectory.DOWNLOAD),
"mconnect");
try {
DirUtils.create_with_parents(ShareHandler.DOWNLOADS,
0700);
} catch (IOError e) {
warning("failed to create downloads directory: %s", e.message);
if (DirUtils.create_with_parents(ShareHandler.DOWNLOADS,
0700) == -1) {
warning("failed to create downloads directory: %s",
Posix.strerror(Posix.errno));
}
}


Loading…
Cancel
Save