--- sourceforge.net/trunk/rdesktop/disk.c 2004/02/06 10:41:34 600 +++ sourceforge.net/trunk/rdesktop/disk.c 2004/02/15 21:19:28 608 @@ -84,7 +84,7 @@ #define SOLARIS #endif -#ifdef SOLARIS +#if (defined(SOLARIS) || defined(__hpux)) #define DIRFD(a) ((a)->dd_fd) #else #define DIRFD(a) (dirfd(a)) @@ -102,7 +102,7 @@ #include /* ctime */ -#if defined(SOLARIS) +#if (defined(SOLARIS) || defined (__hpux) || defined(__BEOS__)) #include /* solaris statvfs */ #define STATFS_FN(path, buf) (statvfs(path,buf)) #define STATFS_T statvfs @@ -185,7 +185,7 @@ /* optarg looks like ':h:=/mnt/floppy,b:=/mnt/usbdevice1' */ /* when it arrives to this function. */ int -disk_enum_devices(int *id, char *optarg) +disk_enum_devices(uint32 * id, char *optarg) { char *pos = optarg; char *pos2; @@ -660,9 +660,17 @@ case 13: /* FileDispositionInformation */ //unimpl("IRP Set File Information class: FileDispositionInformation\n"); - // in_uint32_le(in, delete_on_close); + + //in_uint32_le(in, delete_on_close); // disk_close(handle); - unlink(pfinfo->path); + if ((pfinfo->flags_and_attributes & FILE_DIRECTORY_FILE)) // remove a directory + { + if (rmdir(pfinfo->path) < 0) + return STATUS_ACCESS_DENIED; + } + else if (unlink(pfinfo->path) < 0) // unlink a file + return STATUS_ACCESS_DENIED; + break; case 19: /* FileAllocationInformation */