path check
This commit is contained in:
parent
0b015b0864
commit
1c9dddeb2b
1 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue