mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
catch already deleted entries
This commit is contained in:
parent
2aa30eaa28
commit
c686dd026f
1 changed files with 4 additions and 1 deletions
|
@ -31,7 +31,10 @@ class SiteFile < Sequel::Model
|
||||||
end
|
end
|
||||||
|
|
||||||
site.site_files_dataset.where(path: /^#{Regexp.quote path}\//, is_directory: false).all.each do |site_file|
|
site.site_files_dataset.where(path: /^#{Regexp.quote path}\//, is_directory: false).all.each do |site_file|
|
||||||
site_file.destroy
|
begin
|
||||||
|
site_file.destroy
|
||||||
|
rescue Sequel::NoExistingObject
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
|
Loading…
Add table
Reference in a new issue