diff options
author | David Kocik <kocikdav@gmail.com> | 2019-12-18 17:40:48 +0300 |
---|---|---|
committer | David Kocik <kocikdav@gmail.com> | 2019-12-19 13:13:27 +0300 |
commit | 3d08e8ae321a5c75976b336055a9bc0208c47507 (patch) | |
tree | 853872730fb4aea20fe54e11f91f17ac93c31620 /src/slic3r/GUI/RemovableDriveManager.cpp | |
parent | 3a54279cecbd7d6ac83d5856f03fb13b61f009be (diff) |
is path on removable drive
Diffstat (limited to 'src/slic3r/GUI/RemovableDriveManager.cpp')
-rw-r--r-- | src/slic3r/GUI/RemovableDriveManager.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/slic3r/GUI/RemovableDriveManager.cpp b/src/slic3r/GUI/RemovableDriveManager.cpp index 7a2464351..d9cecc3e8 100644 --- a/src/slic3r/GUI/RemovableDriveManager.cpp +++ b/src/slic3r/GUI/RemovableDriveManager.cpp @@ -380,9 +380,11 @@ bool RemovableDriveManager::is_path_on_removable_drive(const std::string &path) { if (m_current_drives.empty()) return false; + std::size_t found = path.find_last_of("/"); + std::string new_path = path.substr(0,found); for (auto it = m_current_drives.begin(); it != m_current_drives.end(); ++it) { - if(compare_filesystem_id(path, (*it).path)) + if(compare_filesystem_id(new_path, (*it).path)) return true; } return false; |