catch dir too long

This commit is contained in:
Kyle Drake 2025-04-15 15:35:17 -05:00
parent f4fcf94b1a
commit 3ccb4ace37
3 changed files with 17 additions and 7 deletions

View file

@ -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