Bug in mkFullPathname

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug in mkFullPathname

mailing lists
Assume I have got a zPath like abc.def passed to mkFullPathname. Inside mkFullPathname zPath[0] != '/' will evaluate to true. Assume further that osGetcwd(..) will return '/' (which can actually be the case under Android and theoretically under other systems as well but probably less likely). In this case zout will contain finally "//abc.def". This is an invalid pathname, I believe.

Best regards,
Hartwig


_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Bug in mkFullPathname

Richard Hipp-3
On 1/10/17, skywind mailing lists <[hidden email]> wrote:
> zout will contain finally "//abc.def". This is an invalid
> pathname, I believe.

Actually, //abc.def and /abcdef are equivalent, on every unix system I
have ever used.  Try it!

   ls /bin
   ls //bin
   ls //////bin

--
D. Richard Hipp
[hidden email]
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: Bug in mkFullPathname

Warren Young
On Jan 10, 2017, at 3:17 PM, Richard Hipp <[hidden email]> wrote:
>
> On 1/10/17, skywind mailing lists <[hidden email]> wrote:
>> zout will contain finally "//abc.def". This is an invalid
>> pathname, I believe.
>
> Actually, //abc.def and /abcdef are equivalent, on every unix system I
> have ever used.  Try it!

HTTP servers generally obey that, too, but Fossil doesn’t:

   https://www.fossil-scm.org/index.html//timeline

fails.
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users