-
Notifications
You must be signed in to change notification settings - Fork 571
Create host directory when using SyncFolders if it doesn't exist #17
Conversation
Unfortunately Otherwise, great patch. :) |
Thanks for the comments! I'm swamped today but I think I can update the patch within the next 24-48 hours |
Had some time on the train to update this :) |
# Create the host path if it doesn't exist | ||
begin | ||
FileUtils::mkdir_p(hostpath) | ||
rescue Exception => err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's unlikely that you want to rescue Exception
here. You probably want StandardError
, as the former rescues exciting exceptions like SyntaxError
and SignalException
. This can be simplified to rescue => err
.
Thanks for the advice @titanous. I've since updated this PR |
This looks good. One more thing: The shared folder should only be created if the |
I've added the :create flag check, thanks for the PR |
Fixes #16
Includes error handling, such as:
Also fixes a minor typo in the English locale for the rsync error message.