nonexistent virtual device path.
(chdir): Set correct errno when attempt is made to cd to nonexistent virtual
device path.
2002-05-30 Christopher Faylor <cgf@redhat.com>
+ * path.cc (path_conv::check): Set fileattr to INVALID_FILE_ATTRIBUTES
+ for nonexistent virtual device path.
+ (chdir): Set correct errno when attempt is made to cd to nonexistent
+ virtual device path.
+
+2002-05-30 Christopher Faylor <cgf@redhat.com>
+
* fhandler_disk_file.cc (fhandler_disk_file::fstat): Always call
fstat_by_name if fd is not opened to allow fstat_by_name to properly
set errno.
case 2:
fileattr = FILE_ATTRIBUTE_DIRECTORY;
break;
- default:
case -1:
fileattr = 0;
+ break;
+ default:
+ fileattr = INVALID_FILE_ATTRIBUTES;
+ break;
}
delete fh;
goto out;
int devn = path.get_devn();
if (!isvirtual_dev (devn))
res = SetCurrentDirectory (native_dir) ? 0 : -1;
+ else if (!path.exists ())
+ {
+ set_errno (ENOENT);
+ return -1;
+ }
else
{
native_dir = "c:\\";