This repository was archived by the owner on Sep 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 87
feat: ability to use multiple wow folders with a single ajour instance #574
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@tarkah im pretty happy with the outcome of this PR. Please let me know what you think. |
tarkah
reviewed
Mar 17, 2021
tarkah
reviewed
Mar 17, 2021
tarkah
reviewed
Mar 17, 2021
tarkah
reviewed
Mar 17, 2021
@casperstorm looks good. I've added some comments but it's small stuff. I need to do some testing still. Awesome job! |
How and where should we check for newly added paths? One way is to do the following: // Check if any new flavor has been added since last time.
// Get missing flavors.
let mut missing_flavors: Vec<&Flavor> = vec![];
for flavor in Flavor::ALL.iter() {
if let None = ajour.config.wow.directories.get(flavor) {
missing_flavors.push(flavor);
}
}
let flavors = &ajour.config.wow.directories.keys().collect::<Vec<_>>();
for flavor in flavors {
// Find root dir of the flavor and check if any of the missing_flavor's is there.
// If it is, we added it to the directories.
if let Some(root_dir) = ajour.config.get_root_directory_for_flavor(flavor) {
for missing_flavor in &missing_flavors {
let flavor_dir = ajour
.config
.get_flavor_directory_for_flavor(missing_flavor, &root_dir);
if flavor_dir.exists() {
ajour
.config
.wow
.directories
.insert(**missing_flavor, flavor_dir);
}
}
}
} |
Agreed, lets put this under the Parse message so it checks everytime the user launches or refreshes |
@tarkah i've added the logic we discussed now. I found another case I solved as well. As i see it this is the QA:
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With this PR it is possible to manage multiple World of Warcraft folders. Use case is if you have retail and classic in two different dirs.
Checklist
CHANGELOG.md
if knowledge of this change could be valuable to users