Commit 4707034a authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

fs: unix: Device: Ensure a mountpoint path ends with '/'

This is assumed when composing file path
parent f0f0e53f
...@@ -57,6 +57,8 @@ Device::Device( const std::string& uuid, const std::string& mountpoint, bool isR ...@@ -57,6 +57,8 @@ Device::Device( const std::string& uuid, const std::string& mountpoint, bool isR
, m_present( true ) , m_present( true )
, m_removable( isRemovable ) , m_removable( isRemovable )
{ {
if ( *m_mountpoint.crbegin() != '/' )
m_mountpoint += '/';
} }
const std::string& Device::uuid() const const std::string& Device::uuid() const
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment