mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
return 404 for missing file on rename
This commit is contained in:
parent
a148f87701
commit
9ad4b27a50
1 changed files with 1 additions and 0 deletions
|
@ -52,6 +52,7 @@ map '/webdav' do
|
|||
env['PATH_INFO'] = env['PATH_INFO'][1..env['PATH_INFO'].length] if env['PATH_INFO'][0] == '/'
|
||||
|
||||
site_file = @site.site_files.select {|s| s.path == env['PATH_INFO']}.first
|
||||
return [404, {}, ['']] if site_file.nil?
|
||||
res = site_file.rename destination
|
||||
|
||||
return [201, {}, ['']]
|
||||
|
|
Loading…
Add table
Reference in a new issue