* fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name): Check specifically

for non-existent file, first.
(fhandler_disk_file::fstat): Perform fd open on files with funny characters.
This commit is contained in:
Christopher Faylor 2002-06-02 16:53:29 +00:00
parent 47413f8473
commit 97478fe6b4
2 changed files with 15 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2002-06-02 Christopher Faylor <cgf@redhat.com>
* fhandler_disk_file.cc (fhandler_disk_file::fstat_by_name): Check
specifically for non-existent file, first.
(fhandler_disk_file::fstat): Perform fd open on files with funny
characters.
2002-06-02 Christopher January <chris@atomice.net>
* fhandler_process.cc (fhandler_process::open): Set fileid.

View File

@ -102,7 +102,12 @@ fhandler_disk_file::fstat_by_name (struct __stat64 *buf, path_conv *pc)
HANDLE handle;
WIN32_FIND_DATA local;
if ((handle = FindFirstFile (pc->get_win32 (), &local)) == INVALID_HANDLE_VALUE)
if (!pc->exists ())
{
set_errno (ENOENT);
res = -1;
}
else if ((handle = FindFirstFile (pc->get_win32 (), &local)) == INVALID_HANDLE_VALUE)
{
__seterrno ();
res = -1;
@ -140,7 +145,8 @@ fhandler_disk_file::fstat (struct __stat64 *buf, path_conv *pc)
else
query_open_already = false;
if (query_open_already && strncasematch (pc->volname (), "FAT", 3))
if (query_open_already && strncasematch (pc->volname (), "FAT", 3)
&& !strpbrk (get_win32_name (), "?*|<>|"))
oret = 0;
else if (!(oret = open (pc, open_flags, 0)))
{