* dir.cc (readdir_worker): Use slash as path separator when evaluating
namehash for paths below /proc. * fhandler_netdrive.cc (fhandler_netdrive::readdir): Use expensive inode number evaluation on share names.
This commit is contained in:
parent
4f1558d132
commit
5d93840135
@ -1,3 +1,10 @@
|
||||
2006-02-28 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* dir.cc (readdir_worker): Use slash as path separator when evaluating
|
||||
namehash for paths below /proc.
|
||||
* fhandler_netdrive.cc (fhandler_netdrive::readdir): Use expensive
|
||||
inode number evaluation on share names.
|
||||
|
||||
2006-02-27 Christopher Faylor <cgf@timesys.com>
|
||||
|
||||
* fhandler_disk_file.cc (fhandler_disk_file::opendir): Only set
|
||||
|
@ -131,8 +131,12 @@ readdir_worker (DIR *dir, dirent *de)
|
||||
if (!is_dot && !is_dot_dot)
|
||||
{
|
||||
const char *w32name = ((fhandler_base *) dir->__fh)->get_win32_name ();
|
||||
DWORD devn = ((fhandler_base *) dir->__fh)->get_device ();
|
||||
/* Paths below /proc don't have a Win32 pendant. */
|
||||
if (devn == FH_PROC || devn == FH_PROCESS || devn == FH_REGISTRY)
|
||||
de->d_ino = hash_path_name (de->d_ino, "/");
|
||||
/* A drive's root dir has a trailing backslash already. */
|
||||
if (w32name[1] != ':' || w32name[2] != '\\' || w32name[3])
|
||||
else if (w32name[1] != ':' || w32name[2] != '\\' || w32name[3])
|
||||
de->d_ino = hash_path_name (de->d_ino, "\\");
|
||||
de->d_ino = hash_path_name (de->d_ino, de->d_name);
|
||||
}
|
||||
|
@ -206,7 +206,10 @@ fhandler_netdrive::readdir (DIR *dir, dirent *de)
|
||||
dir->__d_position++;
|
||||
char *bs = strrchr (nro->lpRemoteName, '\\');
|
||||
strcpy (de->d_name, bs ? bs + 1 : nro->lpRemoteName);
|
||||
de->d_ino = hash_path_name (get_namehash (), de->d_name);
|
||||
if (strlen (get_name ()) == 2)
|
||||
de->d_ino = hash_path_name (get_namehash (), de->d_name);
|
||||
else
|
||||
de->d_ino = readdir_get_ino (dir, nro->lpRemoteName, false);
|
||||
|
||||
res = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user