Commit b2438cad authored by Tor Lillqvist's avatar Tor Lillqvist Committed by Tor Lillqvist
Browse files

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.
parent 2df600a6
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()
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment