[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[DotGNU]Errno Weirdness & Need a `HAVE_RENAME'
From: |
Aditya P. Bansod |
Subject: |
[DotGNU]Errno Weirdness & Need a `HAVE_RENAME' |
Date: |
Tue, 17 Dec 2002 17:18:18 -0800 |
Hi all,
When I enter into support/dir.c, I see the errno being already at 2
(directory not found). I'm almost done with the Directory.Move function, but
this oddity is holding me up. Should I ignore it? Or is there something else
I should be worried about?
Debug statements show:
_IL_DirMethods_Rename inside (from engine/lib_dir.c)
IN ILRenameDir (from support/dir.c)
NEITHER old or new name were null
ERRNO before 2 (before rename is called)
ERRNO after 2, rename ret = 0 (after rename)
The C# code that causes this is:
string del = "/home/abansod/test/treecc";
string delnew = "/home/abansod/test/treecc_new";
Directory.Move(del, delnew);
Currently, I'm just ignoring the errno if rename returns 0, otherwise I
throw the errno, such as:
if(retVal == 0)
return IL_ERRNO_Success;
else
return ILSysIOConvertErrno(errno);
Secondly, in support/dir.c I'd like to have a HAVE_RENAME so I can #ifdef
HAVE_RENAME before I call rename. I couldn't really find where to put it
(I'm no expert on SCM).
Thanks!
--Aditya