FIX: Moving upload to tombstone should update modification time.

A upload created a long time ago will be nuked from the tombstone
immediately if it gets deleted.
This commit is contained in:
Guo Xiang Tan
2018-09-18 10:48:29 +08:00
parent f2fbf1fdb0
commit ce6a0a5e9e
3 changed files with 49 additions and 16 deletions

View File

@ -17,6 +17,7 @@ module FileStore
dir = Pathname.new(destination).dirname
FileUtils.mkdir_p(dir) unless Dir.exists?(dir)
FileUtils.move(source, destination, force: true)
FileUtils.touch(destination)
end
def has_been_uploaded?(url)