Revert change below. It wasn't a good idea after all, says the original

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.
This commit is contained in:
Tor Lillqvist 2006-03-31 19:16:23 +00:00 committed by Tor Lillqvist
parent 2df600a633
commit b2438cad51
3 changed files with 19 additions and 2 deletions

View File

@ -1,3 +1,9 @@
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()

View File

@ -1,3 +1,9 @@
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()

View File

@ -758,6 +758,11 @@ g_unlink (const gchar *filename)
* 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
*
@ -780,7 +785,7 @@ g_remove (const gchar *filename)
}
retval = _wremove (wfilename);
if (retval == -1 && errno == ENOENT)
if (retval == -1)
retval = _wrmdir (wfilename);
save_errno = errno;
@ -802,7 +807,7 @@ g_remove (const gchar *filename)
}
retval = remove (cp_filename);
if (retval == -1 && errno == ENOENT)
if (retval == -1)
retval = rmdir (cp_filename);
save_errno = errno;