cellar translate will now use resolve_drive_letter

This commit is contained in:
Nicholas O'Connor 2019-05-15 18:09:22 -07:00
parent b305cf56f4
commit 85cec3444c

View File

@ -27,7 +27,7 @@ string cellar::paths::translate(std::string in_path, bool lazy) {
} }
if (windows_input) { if (windows_input) {
// lazy if (lazy) {
if (boost::algorithm::to_lower_copy(in_path.substr(0,1)) != "z") { if (boost::algorithm::to_lower_copy(in_path.substr(0,1)) != "z") {
throw invalid_argument("lazy path translation isn't possible for drive letters other than Z:"); throw invalid_argument("lazy path translation isn't possible for drive letters other than Z:");
} }
@ -40,6 +40,9 @@ string cellar::paths::translate(std::string in_path, bool lazy) {
} }
return out_path; return out_path;
} else {
return paths::resolve_drive_letter(in_path);
}
} else { } else {
// lazy // lazy
string out_path = "Z:"; string out_path = "Z:";