feat: warnings when instance resources are linked
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
parent
9f441a9678
commit
a1053a4c5a
13 changed files with 179 additions and 3 deletions
|
@ -94,6 +94,19 @@ class Resource : public QObject {
|
|||
// Delete all files of this resource.
|
||||
bool destroy();
|
||||
|
||||
[[nodiscard]] auto isSymLink() const -> bool { return m_file_info.isSymLink(); }
|
||||
|
||||
/**
|
||||
* @brief Take a instance path, checks if the file pointed to by the resource is a symlink or under a symlink in that instance
|
||||
*
|
||||
* @param instPath path to an instance directory
|
||||
* @return true
|
||||
* @return false
|
||||
*/
|
||||
[[nodiscard]] bool isSymLinkUnder(const QString& instPath) const;
|
||||
|
||||
[[nodiscard]] bool isMoreThanOneHardLink() const;
|
||||
|
||||
protected:
|
||||
/* The file corresponding to this resource. */
|
||||
QFileInfo m_file_info;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue