Date: Wed, 15 Jul 1998 16:07:52 +0300 (IDT) From: Eli Zaretskii To: Lord Daedron cc: djgpp AT delorie DOT com Subject: Re: File System Commands In-Reply-To: <35ac35c2.0@news.provide.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk 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.