lynx-dev
[Top][All Lists]
Advanced

[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: Klaus Weide
Subject: Re: lynx-dev (patch) dev21: avoid expanding ~ to $HOME for DOS/WIN
Date: Wed, 31 Mar 1999 13:05:02 -0600 (CST)

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.

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?]).

  ---

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]