* travirse the tree
@ 2002-07-27 12:10 danny
0 siblings, 0 replies; only message in thread
From: danny @ 2002-07-27 12:10 UTC (permalink / raw)
To: gcc gnu
Hey Now Gcc People,
I got a new one. This may not be the form for it but here goes...
So maybe u remember I was working w/ recursion. My recursive program
traverses the linux directory. Using g++ the recursive part works fine.
I am using readdir() to read the directory and stat() to let me know if
a file is a sub directory, symbolic link, or a file.
This seems to work until I get here:
/home/danny/.gnome/Desktop/Home Directory.
My program thinks Home Directory is a directory and not a symbolic link.
Thus this recursive program is doomed to infinite loopism!
I here is the code I use to test for symbolic link.
if ( S_ISLNK(aFileStat.st_mode) || (aFileStat.st_mode & S_IFLNK ) )
return 0;
As u c I have tried both methods of checking for a symbolic link and
both fail on this directory. Any ideas why?
Thanks
Danny
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-07-27 19:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-27 12:10 travirse the tree danny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).