Compare commits
No commits in common. "2e65f3744bb745cff0c329e7fbbdbae7d66054ec" and "495aee464d1570f00069bc8ea44b708b2f96e438" have entirely different histories.
2e65f3744b
...
495aee464d
|
@ -228,7 +228,7 @@ checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "breeze"
|
name = "breeze"
|
||||||
version = "0.2.6"
|
version = "0.2.5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"argh",
|
"argh",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "breeze"
|
name = "breeze"
|
||||||
version = "0.2.6"
|
version = "0.2.5"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
|
@ -148,13 +148,10 @@ impl Engine {
|
||||||
#[async_recursion::async_recursion]
|
#[async_recursion::async_recursion]
|
||||||
pub async fn gen_saved_name(&self, ext: &str) -> String {
|
pub async fn gen_saved_name(&self, ext: &str) -> String {
|
||||||
// generate a 6-character alphanumeric string
|
// generate a 6-character alphanumeric string
|
||||||
let mut saved_name: String = Alphanumeric.sample_string(&mut rand::thread_rng(), 6);
|
let id: String = Alphanumeric.sample_string(&mut rand::thread_rng(), 6);
|
||||||
|
|
||||||
// if we have an extension, add it now
|
// path on disk
|
||||||
if !ext.is_empty() {
|
let saved_name = format!("{}.{}", id, ext);
|
||||||
saved_name.push('.');
|
|
||||||
saved_name.push_str(ext);
|
|
||||||
}
|
|
||||||
|
|
||||||
if !self.has(&saved_name).await {
|
if !self.has(&saved_name).await {
|
||||||
saved_name
|
saved_name
|
||||||
|
|
Loading…
Reference in New Issue