Re: [Vimprobable-users] Improve handling of file parameters
Vimprobable is a lean web browser optimised for full keyboard control
Brought to you by:
hanness
From: Morgan H. <mt...@gm...> - 2013-03-04 06:28:24
|
Hey Hannes, On Sat, Mar 2, 2013 at 2:16 AM, Hannes Schüller <ha...@yl...> wrote: > > For me, the question which is still open is whether this patch also > fixes the issue of > > vimprobable2 ./index.htm > > which some people seem to experience in the current stable version. I > cannot test it since I cannot reproduce the original issue. If it is > fixed, is it because of the use of realpath or due to the stat call? Yes, it fixes that issue. I believe this is due to URIs involving relative paths not always being supported, depending on the interpreter (which may explain why some people observe this behavior and others do not). You can take a look at this[1] Stack Overflow response for further explanation. The realpath() call fixes this, since it will generate an absolute pathname, expanding all symlinks or relative portions of the path. The stat call is used to determine if something is a file in the case that no URI scheme is provided. Note that as I mentioned previously, if no scheme is provided, it checks for the existence of a file with the given name prior to treating it as a URL, but this can always be overridden by specifying a proper scheme. Regards, Morgan [1] http://stackoverflow.com/questions/7857416/file-uri-scheme-and-relative-files |