Fix #4260: Unable to replace cdn.donmai.us images?

Bug: Replacing posts hosted on cdn.donmai.us didn't work.

Cause: Original files on cdn.donmai.us are hosted under /var/www/danbooru/original/, but replacements
were trying to store them directly under /var/www/danbooru, which failed with a permission error.
We were trying to store them in the wrong directory because we didn't respect the `original_subdir`
option when generating file paths.
This commit is contained in:
evazion
2020-06-09 15:45:56 -05:00
parent 20abd8a5fd
commit 15799f8af7
2 changed files with 13 additions and 1 deletions

View File

@@ -85,7 +85,7 @@ class StorageManager
when :large
"#{base_dir}/sample/#{subdir}#{file}"
when :original
"#{base_dir}/#{subdir}#{file}"
"#{base_dir}/#{original_subdir}#{subdir}#{file}"
end
end