Update of /cvsroot/monetdb/MonetDB/src/gdk
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv24947
Modified Files:
Tag: MonetDB_1-20
gdk_posix.mx
Log Message:
- on Vista, certain file deletes (e.g. xquery logs) fail, because the
files somehow have become read-only. Compensate by making them
writable again when a delete fails.
Index: gdk_posix.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk_posix.mx,v
retrieving revision 1.143.2.3
retrieving revision 1.143.2.4
diff -u -d -r1.143.2.3 -r1.143.2.4
--- gdk_posix.mx 1 Dec 2007 15:06:57 -0000 1.143.2.3
+++ gdk_posix.mx 18 Dec 2007 15:49:28 -0000 1.143.2.4
@@ -1744,7 +1744,13 @@
win_unlink(const char *pathname)
{
int ret = _unlink(pathname);
-
+ if (ret < 0) {
+ /* Vista is paranoid: we cannot delete read-only files owned
+ * by ourselves. Vista somehow also sets these files to
read-only.
+ */
+ (void) SetFileAttributes(path, FILE_ATTRIBUTE_NORMAL);
+ ret = _unlink(pathname);
+ }
if (ret < 0) {
/* it could be the <expletive deleted> indexing
* service which prevents us from doing what we have a
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins