www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/16/00:30:50

From: "Lord Daedron" <daedron AT provide DOT net>
Newsgroups: comp.os.msdos.djgpp
References: <Pine DOT SUN DOT 3 DOT 91 DOT 980715160240 DOT 12215C-100000 AT is>
Subject: Re: File System Commands
Date: Wed, 15 Jul 1998 13:22:18 -0400
Lines: 59
Organization: AwesomePlay Productions
NNTP-Posting-Host: usr18-016.provide.net
Message-ID: <35ace614.0@news.provide.net>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019