Mail Archives: djgpp/1998/07/16/00:30:50
The example is this for my ".." error is this:
When the program is first run, the directory it looks at is
c:\aweplay\create
the choices of directories are:
..
data
deafult
doc
inc
install
obj
src
if, at this first screen, I select "..", it should open c:\aweplay
however, all that is shown is
..
when I should see
..
create
util
war
I searched through for a bug in the code, but I am properly seeing ".\.." as
the directory to open.
Sean Middleditch
of
AwesomePlay Productions
http://www.angelfire.com/biz/aweplay
aweplay AT hotmail DOT com
Eli Zaretskii wrote in message ...
>
>On Wed, 15 Jul 1998, Lord Daedron wrote:
>
>> Here is where the problem begins. If the user selects ".." ( previous
>> directory, or parent directory ), the directory string would be:
>> ".\directory\..". If the user reselects it over and over again, it could
be
>> humongous: ".\directory\..\directory\..\sirectory\.." on so on. My
question
>> is if there is a function that will simplify this
>
>Such a function exists, it is called `_fixpath'. Look up its
>documentation in the library reference.
>
>> Second, if I start in a sub-directory, and the user selects ".." from the
>> starting ( first viewed ) directory, it seems to not read the directory
>> right ( shows nothing but ".." as a choice ). Why does opendir () and
>> readir () do this?
>
>I would say this looks like a bug in your code. readdir doesn't do
>anything special for this case. Please post the shortest program that
>can be used to reproduce this problem. Or at least describe what files
>are in the ".." directory and what is its full path name.
- Raw text -