Fix unmount of drives with spaces in their names (#1744).
[dcpomatic.git] / src / lib / cross_linux.cc
index 983dbb669ea55bb0ac9ca6c066b63122f7ca8cd8..a60f7af6336728f1040523bca306bc4d0454931d 100644 (file)
@@ -274,6 +274,7 @@ get_mounts (string prefix)
                vector<string> bits;
                boost::algorithm::split (bits, line, boost::is_any_of(" "));
                if (bits.size() > 1 && boost::algorithm::starts_with(bits[0], prefix)) {
+                       boost::algorithm::replace_all (bits[1], "\\040", " ");
                        mounts.push_back(make_pair(bits[0], bits[1]));
                        LOG_DISK("Found mounted device %1 from prefix %2", bits[0], prefix);
                }
@@ -344,13 +345,6 @@ Drive::unmount ()
 }
 
 
-string
-Drive::device_for_write () const
-{
-       return device ();
-}
-
-
 void
 unprivileged ()
 {