Skip to content

Commit 17f3836

Browse files
Added check to file_output_directory.mkpath which seems to throw an error on Macs. Closes #119.
1 parent 6d268bf commit 17f3836

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/AppleBackup.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ def back_up_file(filepath_on_phone, filename_on_phone, filepath_on_disk,
235235
file_relative_output_path = Pathname.new("files") + phone_filepath.parent + filename_on_phone
236236

237237
# Create the output directory
238-
file_output_directory.mkpath
238+
file_output_directory.mkpath if !file_output_directory.exist?
239239

240240
# Decrypt and write a new file, or copy the file depending on if we are password protected
241241
tmp_target_filepath = file_output_directory + filename_on_phone

0 commit comments

Comments
 (0)