mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +02:00
Ensure installation status order is stable
This commit is contained in:
@@ -19,7 +19,7 @@
|
|||||||
use aho_corasick::AhoCorasick;
|
use aho_corasick::AhoCorasick;
|
||||||
use lazy_static::lazy_static;
|
use lazy_static::lazy_static;
|
||||||
use rayon::prelude::*;
|
use rayon::prelude::*;
|
||||||
use std::collections::HashMap;
|
use std::collections::{BTreeMap, HashMap};
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
use walkdir::WalkDir;
|
use walkdir::WalkDir;
|
||||||
@@ -48,7 +48,7 @@ impl SearchResults {
|
|||||||
///
|
///
|
||||||
/// These two functions could be combined into a single function, but speed isn't really an
|
/// These two functions could be combined into a single function, but speed isn't really an
|
||||||
/// issue here and it's a bit more organized this way.
|
/// issue here and it's a bit more organized this way.
|
||||||
pub fn installation_status(&self) -> HashMap<&Path, Option<&FoundFile>> {
|
pub fn installation_status(&self) -> BTreeMap<&Path, Option<&FoundFile>> {
|
||||||
let so_files: HashMap<&Path, &FoundFile> = self
|
let so_files: HashMap<&Path, &FoundFile> = self
|
||||||
.so_files
|
.so_files
|
||||||
.iter()
|
.iter()
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ mod files;
|
|||||||
// TODO: Naming and descriptions could be made clearer
|
// TODO: Naming and descriptions could be made clearer
|
||||||
// TODO: When creating copies, check whether `yabridge-host.exe` is in the PATH for the login shell
|
// TODO: When creating copies, check whether `yabridge-host.exe` is in the PATH for the login shell
|
||||||
// TODO: Check for left over files when removing directory
|
// TODO: Check for left over files when removing directory
|
||||||
// TODO: Warn about left over files if not using --prune
|
|
||||||
// TODO: Reward parts of the readme
|
// TODO: Reward parts of the readme
|
||||||
// TODO: Record .dll files processed, .dll files skipped and orphan .so files. Print a summary of
|
// TODO: Record .dll files processed, .dll files skipped and orphan .so files. Print a summary of
|
||||||
// the work done, and allow a --verbose option to print everything.
|
// the work done, and allow a --verbose option to print everything.
|
||||||
@@ -101,6 +100,7 @@ fn add_directory(config: &mut Config, path: PathBuf) {
|
|||||||
/// `config.plugin_dirs`, otherwise this si silently ignored.
|
/// `config.plugin_dirs`, otherwise this si silently ignored.
|
||||||
fn remove_directory(config: &mut Config, path: &Path) {
|
fn remove_directory(config: &mut Config, path: &Path) {
|
||||||
// We've already verified that this path is in `config.plugin_dirs`
|
// We've already verified that this path is in `config.plugin_dirs`
|
||||||
|
// XXS: Would it be a good idea to warn about leftover .so files?
|
||||||
config.plugin_dirs.remove(path);
|
config.plugin_dirs.remove(path);
|
||||||
if let Err(err) = config.write() {
|
if let Err(err) = config.write() {
|
||||||
eprintln!("Error while writing config file: {}", err);
|
eprintln!("Error while writing config file: {}", err);
|
||||||
|
|||||||
Reference in New Issue
Block a user