mirror of
https://github.com/ksherlock/mpw.git
synced 2024-11-25 04:31:52 +00:00
":" path is "." in unix
This commit is contained in:
parent
6449892f51
commit
183078925e
@ -42,10 +42,10 @@ namespace {
|
|||||||
* file -> file
|
* file -> file
|
||||||
* :directory:file -> directory/file
|
* :directory:file -> directory/file
|
||||||
* volume:directory -> /volume/directory
|
* volume:directory -> /volume/directory
|
||||||
|
* : -> ./
|
||||||
* :: -> ../
|
* :: -> ../
|
||||||
* ::: -> ../../
|
* ::: -> ../../
|
||||||
*
|
*
|
||||||
*
|
|
||||||
* To Unix:
|
* To Unix:
|
||||||
* file -> file
|
* file -> file
|
||||||
* directory/file -> :directory:file
|
* directory/file -> :directory:file
|
||||||
@ -77,6 +77,12 @@ namespace {
|
|||||||
};
|
};
|
||||||
|
|
||||||
':' {
|
':' {
|
||||||
|
/*
|
||||||
|
if (ts == begin)
|
||||||
|
rv.append("./");
|
||||||
|
else
|
||||||
|
rv.push_back('/');
|
||||||
|
*/
|
||||||
if (ts != begin)
|
if (ts != begin)
|
||||||
rv.push_back('/');
|
rv.push_back('/');
|
||||||
};
|
};
|
||||||
@ -151,6 +157,8 @@ namespace ToolBox
|
|||||||
// no colon - no problem.
|
// no colon - no problem.
|
||||||
if (!colon) return path;
|
if (!colon) return path;
|
||||||
|
|
||||||
|
// special case ":" -> "."
|
||||||
|
if (colon && path.length() == 1) return ".";
|
||||||
|
|
||||||
const char *p = path.c_str();
|
const char *p = path.c_str();
|
||||||
const char *pe = p + path.length();
|
const char *pe = p + path.length();
|
||||||
|
Loading…
Reference in New Issue
Block a user