You've already forked AstralRinth
forked from didirus/AstralRinth
Inherit dependencies from workspace manifest, and optimize some out (#3655)
* chore: inherit dependencies from workspace, optimize some deps out * Update bitflags from 2.9.0 to 2.9.1 * Fix temp directory leak in check_java_at_filepath * Fix build * Fix lint * chore(app-lib): refactor overkill `futures` executor usage to Tokio MPSC * chore: fix Clippy lint * tweak: optimize out dependency on OpenSSL source build Contrary to what I expected before, this was caused due to the Tauri updater plugin using a different TLS stack than everything else. * chore(labrinth): drop now unused dependency * Update zip because 2.6.1 got yanked * Downgrade weezl to 0.1.8 * Mention that p256 is also a blocker for rand 0.9 * chore: sidestep GitHub review requirements * chore: sidestep GitHub review requirements (2) * chore: sidestep GitHub review requirements (3) --------- Co-authored-by: Josiah Glosson <soujournme@gmail.com>
This commit is contained in:
committed by
GitHub
parent
37cc81a36d
commit
f19643095e
@@ -17,7 +17,6 @@ use either::Either;
|
||||
use enumset::{EnumSet, EnumSetType};
|
||||
use fs4::tokio::AsyncFileExt;
|
||||
use futures::StreamExt;
|
||||
use lazy_static::lazy_static;
|
||||
use quartz_nbt::{NbtCompound, NbtTag};
|
||||
use regex::{Regex, RegexBuilder};
|
||||
use serde::{Deserialize, Serialize};
|
||||
@@ -25,6 +24,7 @@ use std::cmp::Reverse;
|
||||
use std::io::Cursor;
|
||||
use std::net::{Ipv4Addr, Ipv6Addr};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::sync::LazyLock;
|
||||
use tokio::io::AsyncWriteExt;
|
||||
use tokio_util::compat::FuturesAsyncWriteCompatExt;
|
||||
use url::Url;
|
||||
@@ -548,17 +548,19 @@ pub async fn backup_world(instance: &Path, world: &str) -> Result<u64> {
|
||||
}
|
||||
|
||||
fn find_available_name(dir: &Path, file_name: &str, extension: &str) -> String {
|
||||
lazy_static! {
|
||||
static ref RESERVED_WINDOWS_FILENAMES: Regex = RegexBuilder::new(r#"^.*\.|(?:COM|CLOCK\$|CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])(?:\..*)?$"#)
|
||||
static RESERVED_WINDOWS_FILENAMES: LazyLock<Regex> = LazyLock::new(|| {
|
||||
RegexBuilder::new(r#"^.*\.|(?:COM|CLOCK\$|CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])(?:\..*)?$"#)
|
||||
.case_insensitive(true)
|
||||
.build()
|
||||
.unwrap();
|
||||
static ref COPY_COUNTER_PATTERN: Regex = RegexBuilder::new(r#"^(?<name>.*) \((?<count>\d*)\)$"#)
|
||||
.unwrap()
|
||||
});
|
||||
static COPY_COUNTER_PATTERN: LazyLock<Regex> = LazyLock::new(|| {
|
||||
RegexBuilder::new(r#"^(?<name>.*) \((?<count>\d*)\)$"#)
|
||||
.case_insensitive(true)
|
||||
.unicode(true)
|
||||
.build()
|
||||
.unwrap();
|
||||
}
|
||||
.unwrap()
|
||||
});
|
||||
|
||||
let mut file_name = file_name.replace(
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user