[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev (patch) dev21: avoid expanding ~ to $HOME for DOS/WIN

From: Leonid Pauzner
Subject: Re: lynx-dev (patch) dev21: avoid expanding ~ to $HOME for DOS/WIN
Date: Thu, 1 Apr 1999 14:15:58 +0400 (MSD)

31-Mar-99 13:05 Klaus Weide wrote:
> On Wed, 31 Mar 1999, Leonid Pauzner wrote:

>> * fix to avoid expanding ~ to $HOME for non UNIX/VMS filesystems
>>   where this character is a valid char within filename (one particular 
>> problem
>     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>   was for Win95 LFN path being in TEMP, report by
>>   "Robert D. Dedman" <address@hidden>).  More places fixed,
>>   currently ifdef'ed with DOSPATH, but how about __EMX__?  - LP

> It is also a perfectly valid filename char for Unix.  It should be left
> alone in filenames except in special places :at the beginning of a
> given filename string, possibly at the beginning of a path, but NOT
> every ~ in a "/~" (or "~/") pair is special.
We should set the rule, see below.

> If this was broken for DOS/Windows, it is likely broken for Unix, too.

> Not many people have a LYNX_TEMP_SPACE or $HOME or $PWD containing ~,
> so this is unlikely to get detected...  But this could happen more
> frequently when someone mounts a Windows filesystem e.g. on Linux (and
> for some reason LFNs don't get fully mapped).

> Indeed I just tried 'LYNX_TEMP_SPACE=/tmp/foo~bar lynx' (after creating
> the directory /tmp/foo~bar) - it's broken.

>> How about checking for "~/" flashed left
>> instead of  if ((cp = strchr(lynx_temp_space, '~'))) ...?

> There's the other matter that lynx consistently (?) ignores foo in ~foo/.
> Not that I like it, but I assume there are good reasons for it (1. to
> prevent users from looking into other users' directories [this alone
> cannot prevent it of course], 2. difficult to implement right [system
> dependent; maybe impossible in general for VMS?]).

We should set the rule as strict as possible,
preferrably in a separate function.

Let we describe the possible string *before* ~
1) nothing
2) file://localhost/
3) ? complete path ended with a / or probably some prefix on VMS.
4) ? dot

Now let describe the string after ~
1) /
2) ?anything else

what if we have two ~ on the path?

>   ---

> I agree with Doug, ~ in DOS/Windows Lynx should have meaning equivalent to
> Unix and VMS Lynx if possible.

>    Klaus

reply via email to

[Prev in Thread] Current Thread [Next in Thread]