Re: Problematic interpretion of paths starting with double slashes

2018-06-14 Thread Brian Inglis
On 2018-06-13 02:34, Sven Eden wrote: > However, from my two questions, one was answered, and I can > figure out the other just fine by myself. > Q: Can the handling of // be extended to check for / if the > first fails? > A: Yes > Unanswered: Is the relevant stuff to be found in winsup/cygwin? Lo

Re: Problematic interpretion of paths starting with double slashes

2018-06-13 Thread Achim Gratz
Sven Eden writes: > True, if /this isn't just a mount point for //this, meaning > that the "that"s are two different files. […] Again, my main objection is that the interpretation of a path should not change based on the availability or non-availability of any host (or its name resolution) over th

Re: Problematic interpretion of paths starting with double slashes

2018-06-13 Thread Andrey Repin
Greetings, Sven Eden! >> Gesendet: Dienstag, 12. Juni 2018 um 18:28 Uhr >> Von: "Brian Inglis" >> On 2018-06-12 07:14, Sven Eden wrote: >> >> Gesendet: Dienstag, 12. Juni 2018 um 13:52 Uhr >> >> Von: "Eric Blake" >> >> Then fix your script to provide 3 slashes instead of 2. Only 2 slashes >> >>

Re: Problematic interpretion of paths starting with double slashes

2018-06-13 Thread Sven Eden
> Gesendet: Mittwoch, 13. Juni 2018 um 10:09 Uhr > Von: "Corinna Vinschen" > On Jun 12 22:01, Achim Gratz wrote: > > Sven Eden writes: > > > Doing a simple stat on / if (and only if) the UNC lookup > > > fails, does not endanger anything. It wouldn't break > > > anything or do any other damage. Be

Aw: Re: Re: Problematic interpretion of paths starting with double slashes

2018-06-13 Thread Sven Eden
> Gesendet: Dienstag, 12. Juni 2018 um 20:02 Uhr > Von: Lee > On 6/12/18, Sven Eden wrote: > > Good style is to guarantee, that > > not more than one slash is issued. > > Why don't you submit a patch to guarantee that not more than one slash > is issued? Already done. > Or submit a bug report

Re: Problematic interpretion of paths starting with double slashes

2018-06-13 Thread Sven Eden
> Gesendet: Dienstag, 12. Juni 2018 um 19:56 Uhr > Von: "Eric Blake" > On 06/12/2018 08:14 AM, Sven Eden wrote: > > Good style is nice, but in my book, it is trumped by correct code. Yeah. Point taken. :-D > Hey, let's all assume good intent here. I did not mean what I wrote as > an attack aga

Aw: Re: Problematic interpretion of paths starting with double slashes

2018-06-13 Thread Sven Eden
> Gesendet: Dienstag, 12. Juni 2018 um 18:28 Uhr > Von: "Brian Inglis" > On 2018-06-12 07:14, Sven Eden wrote: > >> Gesendet: Dienstag, 12. Juni 2018 um 13:52 Uhr > >> Von: "Eric Blake" > >> Then fix your script to provide 3 slashes instead of 2. Only 2 slashes > >> has the magic UNC behavior. >

Re: Aw: Re: Problematic interpretion of paths starting with double slashes

2018-06-13 Thread Corinna Vinschen
On Jun 12 22:01, Achim Gratz wrote: > Sven Eden writes: > > Doing a simple stat on / if (and only if) the UNC lookup > > fails, does not endanger anything. It wouldn't break > > anything or do any other damage. Besides from adding an > > additional <0.01s lag to any failed access that *really* > >

Re: Aw: Re: Problematic interpretion of paths starting with double slashes

2018-06-12 Thread Achim Gratz
Sven Eden writes: > Doing a simple stat on / if (and only if) the UNC lookup > fails, does not endanger anything. It wouldn't break > anything or do any other damage. Besides from adding an > additional <0.01s lag to any failed access that *really* > meant a network share. > > So no. Adding this ti

Re: Re: Problematic interpretion of paths starting with double slashes

2018-06-12 Thread Lee
On 6/12/18, Sven Eden wrote: >> Gesendet: Dienstag, 12. Juni 2018 um 13:52 Uhr Von: "Eric Blake" >> Then fix your script to provide 3 slashes instead of 2. Only 2 slashes >> has the magic UNC behavior. > > It is not my script. *my* scripts are portable by all means. > >> That is, if you have a scr

Re: Aw: Re: Problematic interpretion of paths starting with double slashes

2018-06-12 Thread Eric Blake
On 06/12/2018 08:14 AM, Sven Eden wrote: Gesendet: Dienstag, 12. Juni 2018 um 13:52 Uhr Von: "Eric Blake" Then fix your script to provide 3 slashes instead of 2. Only 2 slashes has the magic UNC behavior. It is not my script. *my* scripts are portable by all means. Good to know! That is

Re: Problematic interpretion of paths starting with double slashes

2018-06-12 Thread Brian Inglis
On 2018-06-12 07:14, Sven Eden wrote: >> Gesendet: Dienstag, 12. Juni 2018 um 13:52 Uhr >> Von: "Eric Blake" >> Then fix your script to provide 3 slashes instead of 2. Only 2 slashes >> has the magic UNC behavior. > It is not my script. *my* scripts are portable by all means. >> That is, if you ha

Aw: Re: Problematic interpretion of paths starting with double slashes

2018-06-12 Thread Sven Eden
> Gesendet: Dienstag, 12. Juni 2018 um 13:52 Uhr > Von: "Eric Blake" > Then fix your script to provide 3 slashes instead of 2. Only 2 slashes > has the magic UNC behavior. It is not my script. *my* scripts are portable by all means. > That is, if you have a script that is concatenating: > > ${

Re: Problematic interpretion of paths starting with double slashes

2018-06-12 Thread Eric Blake
On 06/12/2018 03:53 AM, Sven Eden wrote: Hello everybody, I have a problem with a script that wants to copy a file, which has a variable paths build from various variables. The first variable is a possible prefix, the second an absolute path. If no prefix is needed, the first consists of jus

Re: Problematic interpretion of paths starting with double slashes

2018-06-12 Thread Adam Dinwoodie
On Tue, 12 Jun 2018 at 09:53, Sven Eden wrote: > I have a problem with a script that wants to copy a file, > which has a variable paths build from various variables. > > The first variable is a possible prefix, the second an > absolute path. If no prefix is needed, the first consists of > just a sl

Problematic interpretion of paths starting with double slashes

2018-06-12 Thread Sven Eden
Hello everybody,   I have a problem with a script that wants to copy a file, which has a variable paths build from various variables. The first variable is a possible prefix, the second an absolute path. If no prefix is needed, the first consists of just a slash. What I now see is the following: