mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-30 14:57:59 +01:00
Make image [un]hiding wipe thumb target pre-transfer and not need source
This commit is contained in:
parent
0a93da7952
commit
8f7a9b7c50
1 changed files with 4 additions and 2 deletions
|
@ -9,14 +9,16 @@ defmodule Philomena.Images.Hider do
|
|||
source = image_thumb_dir(image)
|
||||
target = image_thumb_dir(image, key)
|
||||
|
||||
File.rename!(source, target)
|
||||
File.rm_rf(target)
|
||||
File.rename(source, target)
|
||||
end
|
||||
|
||||
def unhide_thumbnails(image, key) do
|
||||
source = image_thumb_dir(image, key)
|
||||
target = image_thumb_dir(image)
|
||||
|
||||
File.rename!(source, target)
|
||||
File.rm_rf(target)
|
||||
File.rename(source, target)
|
||||
end
|
||||
|
||||
# fixme: these are copied from the thumbnailer
|
||||
|
|
Loading…
Reference in a new issue