mirror of
https://github.com/neocities/neocities.git
synced 2025-07-23 02:56:05 +02:00
Fix bug allowing you to delete your own site directory
This commit is contained in:
parent
092eb4536f
commit
397f34a014
3 changed files with 26 additions and 0 deletions
|
@ -637,6 +637,7 @@ class Site < Sequel::Model
|
|||
end
|
||||
|
||||
def delete_file(path)
|
||||
return false if files_path(path) == files_path
|
||||
begin
|
||||
FileUtils.rm files_path(path)
|
||||
rescue Errno::EISDIR
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue