unify protocol: and drive-letter: handling in filenames
cover unify protocol: and drive-letter: handling in filenames
Currently recognision of protocol: and d: (drive letter on windows) are spread over in block.c in adhoc manner, disallows usage of filenames with colons in them, intermixes URLs (which should be treated as protocol-specific) and pathnames.
The following patch series tries to address these defects.
After this patch series, protocol: prefix is recognized as such only if it matches [a-z_]{1,31} pattern (so e.g. ./foo:bar is not recognized as having protocol "./foo"), we don't combine c:\foo and d:bar on windows to form (incorrect) c:\bar anymore, and overall path handling is now a bit more clean, in my opinion anyway.
The patchset is, unfortunately, untested on Windows.
Thanks!
Michael Tokarev (3):
make path_has_protocol() to return pointer instead of bool use new path_has_protocol() in bdrv_find_protocol() make path_combine() especially for filenames, not URLs
block.c | 97 +++++++++++++++++++++++++++----------------------------------- 1 files changed, 42 insertions(+), 55 deletions(-)
Signature · 1 line
1.7.2.3