From: danny <danny@3rdplanetsoftware.com>
To: gcc gnu <gcc-help@gcc.gnu.org>
Subject: travirse the tree
Date: Sat, 27 Jul 2002 12:10:00 -0000 [thread overview]
Message-ID: <3D42EB35.8BCCF587@3rdplanetsoftware.com> (raw)
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
reply other threads:[~2002-07-27 19:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3D42EB35.8BCCF587@3rdplanetsoftware.com \
--to=danny@3rdplanetsoftware.com \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).