From: Vince Darley Date: Mon, 7 Jul 2003 12:19:33 +0000 (+0000) Subject: better error messages X-Git-Tag: vfs-1-3~11 X-Git-Url: https://privyetmir.co.uk/gitweb.cgi?a=commitdiff_plain;h=cb22f2041023c3af7e8bac14cb0210f9223f40b9;p=tclvfs better error messages --- diff --git a/library/ftpvfs.tcl b/library/ftpvfs.tcl index 1864ab6..12903e9 100644 --- a/library/ftpvfs.tcl +++ b/library/ftpvfs.tcl @@ -267,14 +267,20 @@ proc vfs::ftp::matchindirectory {fd path actualpath pattern type} { proc vfs::ftp::createdirectory {fd name} { ::vfs::log "createdirectory $name" if {![ftp::MkDir $fd $name]} { - error "failed" + # Can we be more specific here? + vfs::filesystem posixerror $::vfs::posix(EACCES) } } proc vfs::ftp::removedirectory {fd name recursive} { ::vfs::log "removedirectory $name $recursive" if {![ftp::RmDir $fd $name]} { - error "failed" + # Can we be more specific here? + if {$recursive} { + vfs::filesystem posixerror $::vfs::posix(EACCES) + } else { + vfs::filesystem posixerror $::vfs::posix(EACCES) + } } } @@ -282,7 +288,7 @@ proc vfs::ftp::deletefile {fd name} { ::vfs::log "deletefile $name" if {![ftp::Delete $fd $name]} { # Can we be more specific here? - error "failed" + vfs::filesystem posixerror $::vfs::posix(EACCES) } }