From 1c9dddeb2b923c2444def337ab0f7f0be34a099d Mon Sep 17 00:00:00 2001 From: David Kocik Date: Wed, 4 Dec 2019 13:18:08 +0100 Subject: [PATCH] path check --- src/slic3r/GUI/RemovableDriveManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/RemovableDriveManager.cpp b/src/slic3r/GUI/RemovableDriveManager.cpp index 3ff5735f9..7216763ee 100644 --- a/src/slic3r/GUI/RemovableDriveManager.cpp +++ b/src/slic3r/GUI/RemovableDriveManager.cpp @@ -254,13 +254,13 @@ void RemovableDriveManager::eject_drive(const std::string &path) { if(correct_path[i]==' ') { - correct_path = correct_path.insert(i,"\\"); + correct_path = correct_path.insert(i,1,'\\'); i++; } } - std::cout<<"Ejecting "<<(*it).name<<" from "<< (*it).path<<"\n"; + std::cout<<"Ejecting "<<(*it).name<<" from "<< correct_path<"\n"; std::string command = "umount "; - command += (*it).path; + command += correct_path; int err = system(command.c_str()); if(err) {