path check

This commit is contained in:
David Kocik 2019-12-04 13:18:08 +01:00
parent 0b015b0864
commit 1c9dddeb2b

View file

@ -254,13 +254,13 @@ void RemovableDriveManager::eject_drive(const std::string &path)
{ {
if(correct_path[i]==' ') if(correct_path[i]==' ')
{ {
correct_path = correct_path.insert(i,"\\"); correct_path = correct_path.insert(i,1,'\\');
i++; i++;
} }
} }
std::cout<<"Ejecting "<<(*it).name<<" from "<< (*it).path<<"\n"; std::cout<<"Ejecting "<<(*it).name<<" from "<< correct_path<"\n";
std::string command = "umount "; std::string command = "umount ";
command += (*it).path; command += correct_path;
int err = system(command.c_str()); int err = system(command.c_str());
if(err) if(err)
{ {