aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/World.h
diff options
context:
space:
mode:
authorTrial97 <alexandru.tripon97@gmail.com>2023-05-03 00:56:26 +0300
committerTrial97 <alexandru.tripon97@gmail.com>2023-05-03 00:56:26 +0300
commit42dc3ed03f76f1064d6367a4d90f7cea895bcb6b (patch)
tree5923fa27324aef89b6539c69e8d4d242302097fd /launcher/minecraft/World.h
parentf6ed2036b34177d7f932007dc5b3cc3d59f99aea (diff)
parent64ba5e4ed1456bed159cfe7b41ed9175b8baf5c4 (diff)
downloadPrismLauncher-42dc3ed03f76f1064d6367a4d90f7cea895bcb6b.tar.gz
PrismLauncher-42dc3ed03f76f1064d6367a4d90f7cea895bcb6b.tar.bz2
PrismLauncher-42dc3ed03f76f1064d6367a4d90f7cea895bcb6b.zip
Merge branch 'develop' of https://github.com/PrismLauncher/PrismLauncher into Fix_Assert
Diffstat (limited to 'launcher/minecraft/World.h')
-rw-r--r--launcher/minecraft/World.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/launcher/minecraft/World.h b/launcher/minecraft/World.h
index 8327253a..10328cce 100644
--- a/launcher/minecraft/World.h
+++ b/launcher/minecraft/World.h
@@ -95,6 +95,21 @@ public:
// WEAK compare operator - used for replacing worlds
bool operator==(const World &other) const;
+ [[nodiscard]] auto isSymLink() const -> bool{ return m_containerFile.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;
+
+ QString canonicalFilePath() const { return m_containerFile.canonicalFilePath(); }
+
private:
void readFromZip(const QFileInfo &file);
void readFromFS(const QFileInfo &file);