mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
Add mention loops over unlink/rename might not be needed.
This commit is contained in:
@ -10,7 +10,7 @@
|
|||||||
* Win32 (NT, Win2k, XP). replace() doesn't work on Win95/98/Me.
|
* Win32 (NT, Win2k, XP). replace() doesn't work on Win95/98/Me.
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/port/dirmod.c,v 1.25 2004/09/10 09:53:08 momjian Exp $
|
* $PostgreSQL: pgsql/src/port/dirmod.c,v 1.26 2004/09/10 09:58:21 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -68,6 +68,7 @@ pgrename(const char *from, const char *to)
|
|||||||
{
|
{
|
||||||
int loops = 0;
|
int loops = 0;
|
||||||
|
|
||||||
|
/* Is this looped even necessary? */
|
||||||
#if defined(WIN32) && !defined(__CYGWIN__)
|
#if defined(WIN32) && !defined(__CYGWIN__)
|
||||||
while (!MoveFileEx(from, to, MOVEFILE_REPLACE_EXISTING))
|
while (!MoveFileEx(from, to, MOVEFILE_REPLACE_EXISTING))
|
||||||
#endif
|
#endif
|
||||||
@ -113,6 +114,7 @@ pgunlink(const char *path)
|
|||||||
{
|
{
|
||||||
int loops = 0;
|
int loops = 0;
|
||||||
|
|
||||||
|
/* Is this looped even necessary? */
|
||||||
while (unlink(path))
|
while (unlink(path))
|
||||||
{
|
{
|
||||||
if (errno != EACCES)
|
if (errno != EACCES)
|
||||||
|
Reference in New Issue
Block a user