[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
cvs update -P does not work correctly on Windows XP
From: |
Hans Bos (Xelion) |
Subject: |
cvs update -P does not work correctly on Windows XP |
Date: |
Fri, 02 May 2003 14:05:17 +0200 |
Hello,
I noticed that cvs on XP has problems removing directories on
a (NT) file server.
Because of this, cvs update -P doesn't work correctly.
I have looked at the code that removes directories.
Cvs performs an unlink in unlink_file_dir() and when it fails,
it looks at the error code (errno) to see if the file to be unlinked
is a directory.
The error code that is returned on XP (ENOTEMPTY) is not among
the codes that is checked.
When I added a check for ENONEMPTY, everything works ok.
Below is a "cvs diff -c windows-NT/filesubr.c" with my changes.
Greetings,
Hans Bos
-------------------------------------------------------------------------------
Index: windows-NT/filesubr.c
===================================================================
RCS file: /cvsroot/ccvs/windows-NT/filesubr.c,v
retrieving revision 1.37
diff -c -r1.37 filesubr.c
*** windows-NT/filesubr.c 28 Dec 2002 17:58:07 -0000 1.37
--- windows-NT/filesubr.c 2 May 2003 12:55:25 -0000
***************
*** 476,482 ****
{
/* under Windows NT, unlink returns EACCES if the path
is a directory. Under Windows 95, ENOENT. */
! if (errno == EISDIR || errno == EACCES || errno == ENOENT)
return deep_remove_dir (f);
else
/* The file wasn't a directory and some other
--- 476,483 ----
{
/* under Windows NT, unlink returns EACCES if the path
is a directory. Under Windows 95, ENOENT. */
! if (errno == EISDIR || errno == EACCES || errno == ENOENT
! || errno == ENOTEMPTY)
return deep_remove_dir (f);
else
/* The file wasn't a directory and some other
***************
*** 529,535 ****
We aren't really trying to prevent race conditions here
(e.g. what if something changes between readdir and
unlink?) */
! if (errno == EISDIR || errno == EACCES || errno == ENOENT)
{
if (deep_remove_dir (buf))
{
--- 530,537 ----
We aren't really trying to prevent race conditions here
(e.g. what if something changes between readdir and
unlink?) */
! if (errno == EISDIR || errno == EACCES || errno == ENOENT
! || errno == ENOTEMPTY)
{
if (deep_remove_dir (buf))
{
-------------------------------------------------------------------------------
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- cvs update -P does not work correctly on Windows XP,
Hans Bos (Xelion) <=