diff options
author | Kode <TheKodeToad@proton.me> | 2023-05-13 19:07:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-13 19:07:03 +0100 |
commit | f60562c5a247934e39ab33a6d1c5ce64b3127f6a (patch) | |
tree | 3e0ff5817464de7c050c580397503daa9f0ee7bd /launcher/minecraft/mod/Resource.h | |
parent | 18cfe219fef2aabc1d3260764c02cd3476615176 (diff) | |
parent | d5c6a1b4d1e6d052e42366d19ffa0047168e030d (diff) | |
download | PrismLauncher-f60562c5a247934e39ab33a6d1c5ce64b3127f6a.tar.gz PrismLauncher-f60562c5a247934e39ab33a6d1c5ce64b3127f6a.tar.bz2 PrismLauncher-f60562c5a247934e39ab33a6d1c5ce64b3127f6a.zip |
Merge branch 'develop' into mrpack-export
Signed-off-by: Kode <TheKodeToad@proton.me>
Diffstat (limited to 'launcher/minecraft/mod/Resource.h')
-rw-r--r-- | launcher/minecraft/mod/Resource.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/launcher/minecraft/mod/Resource.h b/launcher/minecraft/mod/Resource.h index 0c37f3a3..a5e9ae91 100644 --- a/launcher/minecraft/mod/Resource.h +++ b/launcher/minecraft/mod/Resource.h @@ -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; |