* dtable.cc (fh_alloc): Keep fh which was flagged as error if it is for an
on-disk device and we were stating it. * path.cc (path_conv::check): Set PATH_KEPT_HANDLE. * path.h (path_types): Add PATH_KEPT_HANDLE. (path_conv::kept_handle): Implement.
This commit is contained in:
@@ -607,8 +607,15 @@ fh_alloc (path_conv& pc)
|
||||
fh = cnew (fhandler_nodevice);
|
||||
else if (fh->dev () == FH_ERROR)
|
||||
{
|
||||
delete fh;
|
||||
fh = NULL;
|
||||
if (pc.kept_handle () && pc.dev.isfs ())
|
||||
fh->dev () = pc.dev; /* Special case: This file actually exists on
|
||||
disk and this is a stat() so just return the
|
||||
info from pc. */
|
||||
else
|
||||
{
|
||||
delete fh;
|
||||
fh = NULL;
|
||||
}
|
||||
}
|
||||
return fh;
|
||||
}
|
||||
|
Reference in New Issue
Block a user