bug-tar
[Top][All Lists]
Advanced

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

Re: prefer local files to network connections


From: Paul Eggert
Subject: Re: prefer local files to network connections
Date: Tue, 30 Jan 2024 10:45:53 -0800
User-agent: Mozilla Thunderbird

On 2024-01-30 10:09, Sergey Poznyakoff wrote:
Hi Karl!

I suggest that tar check if a file exists before trying to make a
network connection. This would eliminate the need for --force-local in
(I expect) most cases. As in:

Nice idea.  I'll implement it.

Wait, does this mean 'tar -cf host:file ...' will overwrite the local file 'host:file' only if that file already exists? That sounds confusing.

The 'host:file' convention is already confusing, as this bug report is suggesting to me that I should put 'export TAR_OPTIONS=--force-local' into my .profile, much as I dislike having environment variables affect standard utilities. I'm not sure it's a good idea to make the convention even more confusing.

One possible minor improvement would be to say that file names starting with "/" or with "./" are never remote, even if they have colons in them. Though this likely wouldn't address the glitch that triggered Karl's bug report, at least it'd make it easier to write portable scripts that don't access the network unexpectedly.



reply via email to

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