There was an error while loading. Please reload this page.
1 parent 3ea6a64 commit 9c74515Copy full SHA for 9c74515
1 file changed
Utilities/File.cpp
@@ -227,14 +227,9 @@ static bool is_optical_device_node(const struct ::stat& file_info)
227
// Check whether the path is the root of a mounted filesystem (e.g. the mount point of a disc): "st_dev" changes when crossing a mount point
228
[[maybe_unused]] static bool is_mount_point(const std::string& path, const struct ::stat& file_info)
229
{
230
- // A file is never a mount point: discard it without any syscall (the "stat()" below would fail with ENOTDIR anyway)
231
- if (!S_ISDIR(file_info.st_mode))
232
- {
233
- return false;
234
- }
235
-
236
struct ::stat parent_info;
237
+ // NOTE: it also fails (ENOTDIR) if the path is a file, which is never a mount point
238
if (::stat((path + "/..").c_str(), &parent_info) != 0)
239
240
return false;
0 commit comments