mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
catch for directory edit attempt
This commit is contained in:
parent
9874ce3c5f
commit
4e847e2295
1 changed files with 3 additions and 0 deletions
|
@ -115,6 +115,9 @@ get %r{\/site_files\/text_editor\/(.+)} do
|
|||
rescue Errno::ENOENT
|
||||
flash[:error] = 'We could not find the requested file.'
|
||||
redirect '/dashboard'
|
||||
rescue Errno::EISDIR
|
||||
flash[:error] = 'Cannot edit a directory.'
|
||||
redirect '/dashboard'
|
||||
end
|
||||
erb :'site_files/text_editor'
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue