mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-26 09:14:28 +08:00
is path on removable drive
This commit is contained in:
parent
3a54279cec
commit
3d08e8ae32
@ -380,9 +380,11 @@ bool RemovableDriveManager::is_path_on_removable_drive(const std::string &path)
|
|||||||
{
|
{
|
||||||
if (m_current_drives.empty())
|
if (m_current_drives.empty())
|
||||||
return false;
|
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)
|
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 true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user