lynx-dev
[Top][All Lists]
Advanced

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

lynx-dev bookmarks and remove()/COPY_PATH/MV_PATH (was: Win32 docs patch


From: Klaus Weide
Subject: lynx-dev bookmarks and remove()/COPY_PATH/MV_PATH (was: Win32 docs patch)
Date: Tue, 20 Apr 1999 08:09:12 -0500 (CDT)

On Tue, 20 Apr 1999, Leonid Pauzner wrote:
> 19-Apr-99 19:31 Doug Kaufman wrote:

> > I am not sure about mv.exe. Although I distribute mv.exe with lynx
> > on my web and ftp sites, I am not sure that it is ever used in the
> > DOS port. The last time I grep'ed for this in the code, it was used
> > primarily in the DIRED functions, which aren't compiled into the DOS
> > port. Where is this used by the DOS or Win32 ports?
> 
> I saw it also in LYBookmarks.c multibookmarks code, grep for "LYCopyFile"
> and read few lines below.  It is not clear for me,
> that code use copy, rename and move for different sitiations
> and there is a comment "rename will not work across filesystems".

That comment would also apply for Unix if the Unix code used rename.

> At least for DOS we could use copy only and forget about else
> (IMO ifdef'ing should be corrected: ifdef UNIX -> ifndef VMS).

Maybe, although using rename() for situations where it does work would
be preferable, even for Unix.  [Maybe there are some situations involving
symlinks where rename would be bad.]

The current situation for DOSPATH looks particularly bad: if the MV_PATH
stuff is tried but fails, there is no error indication and the bookmarks
file may disappear silently!  [It should be there as a cryptically-
named temp file after te failure, but that may get deleted when lynx
exits.]

Can the rename() actually fail?  It is unlikely that it fails for the
reason of different filesystems, since bookmark files are supposed
to be under the HOME directory, and the scratch file is created in
the HOME directory (different from other temp files).  This would
break down if bookmark files in arbitrary locations were allowed
(Larry suggested a while ago that absolute paths should be allowed
for bookmarks files).

   Klaus





reply via email to

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