Skip to content

Commit

Permalink
#123: Fix partial install dir matching
Browse files Browse the repository at this point in the history
  • Loading branch information
mtkennerly committed Sep 27, 2022
1 parent 3979f1c commit c27b195
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
but in practice, it made little difference on Windows and would rarely be desired on other platforms,
leading to confusion.
* Fixed:
* When looking for game install folders during a full scan,
Ludusavi did not recognize partial folder name matches.
([Investigated by sluedecke][https://github.com/mtkennerly/ludusavi/issues/123])
* When restoring a backup that was made on a different OS,
it could get stuck before completing the process.
([Contributed by Hizoul](https://github.com/mtkennerly/ludusavi/pull/127))
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,13 @@ Ludusavi also stores `manifest.yaml` (info on what to back up) here.
You should not modify that file, because Ludusavi will overwrite your changes
whenever it downloads a new copy.

### Logging
Log files are stored in the config folder (see above).
By default, only warnings and errors are logged,
but you can customize this by setting the `RUST_LOG` environment variable
(e.g., `RUST_LOG=ludusavi=debug`).
The most recent 5 log files are kept, rotating on app launch or when a log reaches 10 MiB.

## Interfaces
### CLI API
CLI mode defaults to a human-readable format, but you can switch to a
Expand Down
5 changes: 3 additions & 2 deletions src/prelude.rs
Original file line number Diff line number Diff line change
Expand Up @@ -555,8 +555,9 @@ impl InstallDirRanking {
if candidate.0 == i64::MAX {
return Some(candidate.1.to_owned());
}
for other in self.0.values() {
if other.0 > candidate.0 {
for ((other_root, other_game), (other_score, other_subdir)) in &self.0 {
if other_root == root && other_subdir == &candidate.1 && other_score > &candidate.0 {
log::info!("[{name}] outranked by '{other_game}' for subdir '{other_subdir}'");
return None;
}
}
Expand Down

0 comments on commit c27b195

Please sign in to comment.