mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-01 12:24:28 +01:00
19 lines
333 B
Ruby
19 lines
333 B
Ruby
# frozen_string_literal: true
|
|
|
|
# Helpers methods about uploading files
|
|
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
|