1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-06 01:08:21 +01:00
fab-manager/app/helpers/upload_helper.rb
2015-05-05 03:10:25 +02:00

15 lines
261 B
Ruby

module UploadHelper
def delete_empty_dirs
path = File.expand_path(store_dir, root)
Dir.delete(path)
path = File.expand_path(base_store_dir, root)
Dir.delete(path)
rescue SystemCallError
true # nothing, the dir is not empty
end
end