aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/World.h
diff options
context:
space:
mode:
authorRachel Powers <508861+Ryex@users.noreply.github.com>2023-05-12 01:00:26 -0700
committerRachel Powers <508861+Ryex@users.noreply.github.com>2023-05-12 01:00:26 -0700
commit82287e0407318724c5a460340eef2855c75449e8 (patch)
treef083d018d24ce86a02cc8d1edce9b56ef0f4f93d /launcher/minecraft/World.h
parenta3173b53717fcea686f267f4eb8fd9788e6677db (diff)
parentc5aff7cc1ef43a1326bd3ce0c83e29669e2ff43f (diff)
downloadPrismLauncher-82287e0407318724c5a460340eef2855c75449e8.tar.gz
PrismLauncher-82287e0407318724c5a460340eef2855c75449e8.tar.bz2
PrismLauncher-82287e0407318724c5a460340eef2855c75449e8.zip
Merge branch 'develop' into curseforge-url-handle
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);