On Mon, Nov 27, 2006 at 06:07:32PM +0100, Oliver Block wrote:
Hi Marcus,
this is the function code
************************** function code *********************
int file_exists(const char *fname) { struct stat attribut;
if( (stat(fname, &attribut)) == -1) { if(errno == ENOENT) return false; else printf("stat() Fehler: %d\n", errno); } else if( S_ISREG(attribut.st_mode)) return true;
return false; } ***********************************************************
As I could find out so far, it's likely that this is problem of gdb. strace states that stat gets the correct argument.
I have to agree. The code itself looks fine. Ciao, Marcus --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org