1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00
fab-manager/app/helpers/upload_helper.rb

19 lines
333 B
Ruby
Raw Normal View History

2019-04-04 09:33:41 +02:00
# frozen_string_literal: true
# Helpers methods about uploading files
2015-05-05 03:10:25 +02:00
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
2016-03-23 18:39:41 +01:00
end