Index: openacs-4/packages/file-storage/tcl/file-storage-dav-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-dav-procs.tcl,v diff -u -N -r1.12.2.2 -r1.12.2.3 --- openacs-4/packages/file-storage/tcl/file-storage-dav-procs.tcl 12 Sep 2022 15:38:54 -0000 1.12.2.2 +++ openacs-4/packages/file-storage/tcl/file-storage-dav-procs.tcl 20 Sep 2022 12:00:15 -0000 1.12.2.3 @@ -1,11 +1,11 @@ ad_library { - + Procedures for DAV service contract implementations - + @author Dave Bauer (dave@thedesignexperience.org) @creation-date 2003-11-09 @cvs-id $Id$ - + } namespace eval fs::impl::fs_object {} @@ -33,7 +33,7 @@ if {"unlocked" ne [tdav::check_lock $uri] } { return [list 423] } - + set tmp_filename [oacs_dav::conn tmpfile] set tmp_size [ad_file size $tmp_filename] @@ -46,18 +46,18 @@ set response [list 409] return $response } - + if {$item_id eq ""} { fs::add_file \ - -package_id $package_id \ - -name $name \ - -title $name \ - -item_id $item_id \ - -parent_id $parent_id \ - -tmp_filename $tmp_filename \ - -creation_user $user_id \ - -creation_ip [ad_conn peeraddr] \ - + -package_id $package_id \ + -name $name \ + -title $name \ + -item_id $item_id \ + -parent_id $parent_id \ + -tmp_filename $tmp_filename \ + -creation_user $user_id \ + -creation_ip [ad_conn peeraddr] \ + if {[file exists [tdav::get_lock_file $uri]]} { # if there is a null lock use 204 set response [list 204] @@ -72,7 +72,7 @@ -item_id $item_id \ -creation_user $user_id \ -package_id $package_id - + set response [list 204] } file delete -- $tmp_filename @@ -115,7 +115,7 @@ -parent_id $parent_id \ -creation_user $user_id \ -creation_ip $peer_addr \ - } ]} { + } ]} { return [list 500] }