Re: [glob -tails] broken in respect to tilde-filenames!
From: Andreas Leitgeb (avl_at_gamma.logic.tuwien.ac.at)
Date: 03/08/04
- Next message: Andreas Leitgeb: "Re: Improving Tcl's exec [Was: Re: TCL and Python"
- Previous message: Andreas Leitgeb: "Re: [glob -tails] broken in respect to tilde-filenames!"
- In reply to: Zoran Vasiljevic: "Re: [glob -tails] broken in respect to tilde-filenames!"
- Next in thread: Donald Arseneau: "Re: [glob -tails] broken in respect to tilde-filenames!"
- Reply: Donald Arseneau: "Re: [glob -tails] broken in respect to tilde-filenames!"
- Reply: Zoran Vasiljevic: "Re: [glob -tails] broken in respect to tilde-filenames!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 08 Mar 2004 11:56:37 GMT
Zoran Vasiljevic <zoran@archiware.com> wrote:
> I do understand your point. The thing is only: what is more dangerous?
> Displaying a "./" in front of tilde-files or accidentaly deleting
> user home-directory?
Your forgot two points:
- glob is not the only thinkable source of filenames that might start
with a tilde. You'd also have to prepend ./ to every entry-
widget, to gets (it might read some filename from a channel)...
See the point?
if glob returned "safe" filenames, then in every case where these
filenames get presented to the user, the programmer would need
to remove the prefix. (users generally cannot handle a leading
"./". They would see it as a bug or complain that they don't
find/recognize their file in the list!) And after the prefix
is removed, we're back at current state.
The start of the file-manpage does mention tilde-substitution and
refers to the manpage for filename for exact description on
how tilde-substitution exactly works.
Even if no code-change emerges from this thread, it might be a nice move
to add a reminder to the description of [file delete] (being the most
dangerous of all file-subcommands) about tilde-substitution.
That [file split] actually does this automatic "./"-prepending might
be the reason, that made the OP first point to [glob] as point of
trouble (since glob behaves differently than [file split]).
- Next message: Andreas Leitgeb: "Re: Improving Tcl's exec [Was: Re: TCL and Python"
- Previous message: Andreas Leitgeb: "Re: [glob -tails] broken in respect to tilde-filenames!"
- In reply to: Zoran Vasiljevic: "Re: [glob -tails] broken in respect to tilde-filenames!"
- Next in thread: Donald Arseneau: "Re: [glob -tails] broken in respect to tilde-filenames!"
- Reply: Donald Arseneau: "Re: [glob -tails] broken in respect to tilde-filenames!"
- Reply: Zoran Vasiljevic: "Re: [glob -tails] broken in respect to tilde-filenames!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|