* fhandler_netdrive.cc (fhandler_netdrive::telldir): Implement.
(fhandler_netdrive::seekdir): Implement. (fhandler_netdrive::closedir): Call rewinddir to have only one point of calling WNetCloseEnum.
This commit is contained in:
parent
f2b664e0dd
commit
bffaf54d76
@ -1,3 +1,10 @@
|
||||
2005-05-18 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* fhandler_netdrive.cc (fhandler_netdrive::telldir): Implement.
|
||||
(fhandler_netdrive::seekdir): Implement.
|
||||
(fhandler_netdrive::closedir): Call rewinddir to have only one point
|
||||
of calling WNetCloseEnum.
|
||||
|
||||
2005-05-17 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* fhandler.h (class fhandler_netdrive): Add method rewinddir.
|
||||
|
@ -212,12 +212,18 @@ fhandler_netdrive::readdir (DIR *dir)
|
||||
_off64_t
|
||||
fhandler_netdrive::telldir (DIR *dir)
|
||||
{
|
||||
return -1;
|
||||
return dir->__d_position;
|
||||
}
|
||||
|
||||
void
|
||||
fhandler_netdrive::seekdir (DIR *, _off64_t)
|
||||
fhandler_netdrive::seekdir (DIR *dir, _off64_t pos)
|
||||
{
|
||||
rewinddir (dir);
|
||||
if (pos < 0)
|
||||
return;
|
||||
while (dir->__d_position < pos)
|
||||
if (!readdir (dir))
|
||||
break;
|
||||
}
|
||||
|
||||
void
|
||||
@ -232,9 +238,7 @@ fhandler_netdrive::rewinddir (DIR *dir)
|
||||
int
|
||||
fhandler_netdrive::closedir (DIR *dir)
|
||||
{
|
||||
if (dir->__handle != INVALID_HANDLE_VALUE)
|
||||
WNetCloseEnum (dir->__handle);
|
||||
dir->__handle = INVALID_HANDLE_VALUE;
|
||||
rewinddir (dir);
|
||||
return fhandler_virtual::closedir (dir);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user