From cb22f2041023c3af7e8bac14cb0210f9223f40b9 Mon Sep 17 00:00:00 2001 From: Vince Darley Date: Mon, 7 Jul 2003 12:19:33 +0000 Subject: [PATCH] better error messages --- library/ftpvfs.tcl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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) } } -- 2.23.0