From b31244cc3599cac076b5d1e4a3e6ae8d1d709c5d Mon Sep 17 00:00:00 2001 From: Slic3rPE Date: Wed, 5 Feb 2020 16:04:05 +0100 Subject: [PATCH] linux/osx bug fix checking file path --- src/slic3r/GUI/RemovableDriveManager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/slic3r/GUI/RemovableDriveManager.cpp b/src/slic3r/GUI/RemovableDriveManager.cpp index e5e228ef1..aa7a3d6a3 100644 --- a/src/slic3r/GUI/RemovableDriveManager.cpp +++ b/src/slic3r/GUI/RemovableDriveManager.cpp @@ -374,6 +374,11 @@ std::string RemovableDriveManager::get_drive_from_path(const std::string& path) { std::size_t found = path.find_last_of("/"); std::string new_path = found == path.size() - 1 ? path.substr(0, found) : path; + + // trim the filename + found = new_path.find_last_of("/"); + new_path = new_path.substr(0, found); + //check if same filesystem for (auto it = m_current_drives.begin(); it != m_current_drives.end(); ++it) {