RE: Re[5]: setup.exe and inuse files for X

2002-05-16 Thread Robert Collins

One thing I'm not clear on - are both calls -required-?

 -Original Message-
 From: Pavel Tsekov [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, May 16, 2002 8:52 PM
 To: Robert Collins
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re[5]: setup.exe and inuse files for X
 
 
 Ok, I've tested it on my WinXP Home on NTFS, FAT and FAT32. 
 The following snippet removes the file no matter the 
 filesystem (the Get/SetFileAttributes is required for FAT/FAT32 only):
 
 HANDLE hFile;
 DWORD dwAttr = GetFileAttributes (test.dat);
 SetFileAttributes (test.dat, dwAttr  ~FILE_ATTRIBUTE_READONLY);
 hFile = CreateFile (test.dat, DELETE, 0, NULL, OPEN_EXISTING,
   FILE_FLAG_DELETE_ON_CLOSE, NULL);
 CloseHandle (hFile);
 
 RC Does this work on FAT too?
 
 PT I don't know - its not clear from the documentation. 
 Someone has to 
 PT test it on FAT. However this combined with an an call to 
 PT SetFileAttributes () before it should be sufficient.
 
 



RE: Re[5]: setup.exe and inuse files for X

2002-05-16 Thread Robert Collins

Oh, and can you please provide as a patch+ changelog?   

Cheers,
Rob

 -Original Message-
 From: Pavel Tsekov [mailto:[EMAIL PROTECTED]] 
 Sent: Thursday, May 16, 2002 8:52 PM
 To: Robert Collins
 Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re[5]: setup.exe and inuse files for X
 
 
 Ok, I've tested it on my WinXP Home on NTFS, FAT and FAT32. 
 The following snippet removes the file no matter the 
 filesystem (the Get/SetFileAttributes is required for FAT/FAT32 only):
 
 HANDLE hFile;
 DWORD dwAttr = GetFileAttributes (test.dat);
 SetFileAttributes (test.dat, dwAttr  ~FILE_ATTRIBUTE_READONLY);
 hFile = CreateFile (test.dat, DELETE, 0, NULL, OPEN_EXISTING,
   FILE_FLAG_DELETE_ON_CLOSE, NULL);
 CloseHandle (hFile);
 
 RC Does this work on FAT too?
 
 PT I don't know - its not clear from the documentation. 
 Someone has to 
 PT test it on FAT. However this combined with an an call to 
 PT SetFileAttributes () before it should be sufficient.