+2006-03-31 Tor Lillqvist <tml@novell.com>
+
+ * glib/gstdio.c (g_remove): Revert change below. It wasn't a good
+ idea after all, says the original bug reporter. See bug for
+ discussion.
+
2006-03-30 Tor Lillqvist <tml@novell.com>
* glib/gstdio.c (g_remove): [Win32] call rmdir() only if remove()
+2006-03-31 Tor Lillqvist <tml@novell.com>
+
+ * glib/gstdio.c (g_remove): Revert change below. It wasn't a good
+ idea after all, says the original bug reporter. See bug for
+ discussion.
+
2006-03-30 Tor Lillqvist <tml@novell.com>
* glib/gstdio.c (g_remove): [Win32] call rmdir() only if remove()
* Windows, it is in general not possible to remove a file that is
* open to some process, or mapped into memory.
*
+ * If this function fails on Windows you can't infer too much from the
+ * errno value. rmdir() is tried regardless of what caused remove() to
+ * fail. Any errno value set by remove() will be overwritten by that
+ * set by rmdir().
+ *
* Returns: 0 if the file was successfully removed, -1 if an error
* occurred
*
}
retval = _wremove (wfilename);
- if (retval == -1 && errno == ENOENT)
+ if (retval == -1)
retval = _wrmdir (wfilename);
save_errno = errno;
}
retval = remove (cp_filename);
- if (retval == -1 && errno == ENOENT)
+ if (retval == -1)
retval = rmdir (cp_filename);
save_errno = errno;