46 static std::string cygRoot;
47 size_t posCygDrive = path.find(
"/cygdrive/");
48 if (posCygDrive != std::string::npos) {
49 path[posCygDrive] = path[posCygDrive + 10];
50 path[posCygDrive + 1] =
':';
51 path.erase(posCygDrive + 2, 9);
54 size_t posHome = path.find(
"/home/");
55 if (posHome != std::string::npos) {
56 size_t posColumn = path.find(
":");
57 if (posColumn != std::string::npos && posColumn > 0) {
59 if (path[posColumn - 1] >=
'A' && path[posColumn - 1] <=
'Z')
61 if (path[posColumn - 1] >=
'a' && path[posColumn - 1] <=
'z')
64 if (cygRoot.empty()) {
66 size_t len = cygRoot.length();
67 if (cygRoot[len - 1] ==
'/') {
68 cygRoot.erase(len - 1);
71 path.insert(posHome, cygRoot);