fix: cleanup UI, detect FAT and turn off links

Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
Rachel Powers
2023-02-09 16:19:38 -07:00
parent 397e7f0363
commit bc8336a4b1
9 changed files with 175 additions and 61 deletions

View File

@ -1053,4 +1053,32 @@ bool clone_file(const QString& src, const QString& dst, std::error_code& ec)
return true;
}
/**
* @brief if the Filesystem is symlink capable
*
*/
bool canLinkOnFS(const QString& path)
{
FilesystemInfo info = statFS(path);
return canLinkOnFS(info);
}
bool canLinkOnFS(const FilesystemInfo& info)
{
return canLinkOnFS(info.fsType);
}
bool canLinkOnFS(FilesystemType type)
{
return !s_non_link_filesystems.contains(type);
}
/**
* @brief if the Filesystem is symlink capable on both ends
*
*/
bool canLink(const QString& src, const QString& dst)
{
return canLinkOnFS(src) && canLinkOnFS(dst);
}
}