mirror of
https://codeberg.org/tenacityteam/tenacity
synced 2025-10-04 19:12:51 +02:00
Remerge: Add FAT FS check for FreeBSD
This effectively reapplies commits21f2dbf1ad
and7ccf26ce4c
, except it has a separate definition for FreeBSD rather than sharing the same one for FreeBSD and macOS. The code is literally copied and pasted with only "msdos" being changed to "msdosfs". Signed-off-by: Avery King <gperson@disroot.org>
This commit is contained in:
@@ -736,6 +736,15 @@ bool FileNames::IsOnFATFileSystem(const FilePath &path)
|
||||
return false;
|
||||
return 0 == strcmp(fs.f_fstypename, "msdos");
|
||||
}
|
||||
#elif defined(__FreeBSD__)
|
||||
bool FileNames::IsOnFATFileSystem(const FilePath &path)
|
||||
{
|
||||
struct statfs fs;
|
||||
if (statfs(wxPathOnly(path).c_str(), &fs))
|
||||
// Error from statfs
|
||||
return false;
|
||||
return 0 == strcmp(fs.f_fstypename, "msdosfs");
|
||||
}
|
||||
#elif defined(__linux__)
|
||||
#include <sys/statfs.h>
|
||||
#include "/usr/include/linux/magic.h"
|
||||
|
Reference in New Issue
Block a user