mirror of
https://github.com/neocities/neocities.git
synced 2025-08-04 00:31:59 +02:00
fixes for screenshot worker
This commit is contained in:
parent
0aca6b3328
commit
fbf78f04d6
8 changed files with 69 additions and 2 deletions
|
@ -80,7 +80,9 @@ class ScreenshotWorker
|
|||
img = img_list.reverse.flatten_images
|
||||
|
||||
user_screenshots_path = File.join SCREENSHOTS_PATH, username
|
||||
FileUtils.mkdir_p user_screenshots_path
|
||||
screenshot_path = File.join user_screenshots_path, File.dirname(path)
|
||||
|
||||
FileUtils.mkdir_p screenshot_path unless Dir.exists?(screenshot_path)
|
||||
|
||||
Site::SCREENSHOT_RESOLUTIONS.each do |res|
|
||||
img.scale(*res.split('x').collect {|r| r.to_i}).write(File.join(user_screenshots_path, "#{path}.#{res}.jpg")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue