* 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.
This commit is contained in:
parent
81a0a3b440
commit
69be001cea
@ -1,3 +1,10 @@
|
|||||||
|
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>
|
2002-05-30 Christopher Faylor <cgf@redhat.com>
|
||||||
|
|
||||||
* fhandler_disk_file.cc (fhandler_disk_file::fstat): Always call
|
* fhandler_disk_file.cc (fhandler_disk_file::fstat): Always call
|
||||||
|
@ -536,9 +536,12 @@ path_conv::check (const char *src, unsigned opt,
|
|||||||
case 2:
|
case 2:
|
||||||
fileattr = FILE_ATTRIBUTE_DIRECTORY;
|
fileattr = FILE_ATTRIBUTE_DIRECTORY;
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
case -1:
|
case -1:
|
||||||
fileattr = 0;
|
fileattr = 0;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
fileattr = INVALID_FILE_ATTRIBUTES;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
delete fh;
|
delete fh;
|
||||||
goto out;
|
goto out;
|
||||||
@ -3304,6 +3307,11 @@ chdir (const char *in_dir)
|
|||||||
int devn = path.get_devn();
|
int devn = path.get_devn();
|
||||||
if (!isvirtual_dev (devn))
|
if (!isvirtual_dev (devn))
|
||||||
res = SetCurrentDirectory (native_dir) ? 0 : -1;
|
res = SetCurrentDirectory (native_dir) ? 0 : -1;
|
||||||
|
else if (!path.exists ())
|
||||||
|
{
|
||||||
|
set_errno (ENOENT);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
native_dir = "c:\\";
|
native_dir = "c:\\";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user