[ftpii] r282 committed - Return EACCES when ISFS_Open fails with ISFS_EINVAL, so callers get "P...

0 views
Skip to first unread message

codesite...@google.com

unread,
Dec 20, 2009, 10:04:46 AM12/20/09
to ftpii-...@googlegroups.com
Revision: 282
Author: joe.g...@psychlaw.com.au
Date: Sun Dec 20 07:04:06 2009
Log: Return EACCES when ISFS_Open fails with ISFS_EINVAL, so callers
get "Permission denied"

http://code.google.com/p/ftpii/source/detail?r=282

Modified:
/isfs/trunk/source/isfs.c

=======================================
--- /isfs/trunk/source/isfs.c Thu Jan 15 11:51:52 2009
+++ /isfs/trunk/source/isfs.c Sun Dec 20 07:04:06 2009
@@ -145,7 +145,8 @@
file->inUse = true;
file->isfs_fd = ISFS_Open(entry->abspath, ISFS_OPEN_READ);
if (file->isfs_fd < 0) {
- r->_errno = -file->isfs_fd;
+ if (file->isfs_fd == ISFS_EINVAL) r->_errno = EACCES;
+ else r->_errno = -file->isfs_fd;
return -1;
}

Reply all
Reply to author
Forward
0 new messages