mirror of
https://github.com/neocities/neocities.git
synced 2025-08-03 08:11:56 +02:00
catch dir too long
This commit is contained in:
parent
f4fcf94b1a
commit
3ccb4ace37
3 changed files with 17 additions and 7 deletions
|
@ -843,6 +843,10 @@ class Site < Sequel::Model
|
|||
path = scrubbed_path path
|
||||
relative_path = files_path path
|
||||
|
||||
if SiteFile.path_too_long?(relative_path)
|
||||
return 'Directory path is too long.'
|
||||
end
|
||||
|
||||
if Dir.exist?(relative_path) || File.exist?(relative_path)
|
||||
return 'Directory (or file) already exists.'
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue