mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 09:42:36 +02:00
fix for site downloads with a lot of files
This commit is contained in:
parent
1a31d6db3b
commit
a4defc69f7
1 changed files with 4 additions and 2 deletions
|
@ -721,10 +721,12 @@ class Site < Sequel::Model
|
||||||
|
|
||||||
Zip::Archive.open(tmpfile.path, Zip::CREATE) do |ar|
|
Zip::Archive.open(tmpfile.path, Zip::CREATE) do |ar|
|
||||||
ar.add_dir(zip_name)
|
ar.add_dir(zip_name)
|
||||||
|
end
|
||||||
|
|
||||||
Dir.glob("#{base_files_path}/**/*").each do |path|
|
Dir.glob("#{base_files_path}/**/*").each do |path|
|
||||||
relative_path = path.gsub(base_files_path+'/', '')
|
relative_path = path.gsub(base_files_path+'/', '')
|
||||||
|
|
||||||
|
Zip::Archive.open(tmpfile.path, Zip::CREATE) do |ar|
|
||||||
if File.directory?(path)
|
if File.directory?(path)
|
||||||
ar.add_dir(zip_name+'/'+relative_path)
|
ar.add_dir(zip_name+'/'+relative_path)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue