Changes
This commit is contained in:
20 files changed
+113
-79
No files matched your search
+2
-2
@@ -21,7 +21,7 @@ impl FileStorage {
|
||||
pub fn new() -> anyhow::Result<Self> {
|
||||
let var = env::var("DRIVE_STORAGE_PATH");
|
||||
let path_str = match var {
|
||||
Ok(ref string) => string,
|
||||
Ok(ref string) => string.trim(),
|
||||
Err(err) => {
|
||||
tracing::info!(
|
||||
%err,
|
||||
@@ -55,7 +55,7 @@ impl FileStorage {
|
||||
pub async fn create(&self) -> anyhow::Result<(Uuid, impl tokio::io::AsyncWrite)> {
|
||||
let mut error = anyhow::anyhow!("Error creating a file");
|
||||
for _ in 0..3 {
|
||||
let file_id = Uuid::new_v4();
|
||||
let file_id = Uuid::now_v7();
|
||||
match self.create_inner(file_id).await {
|
||||
Ok(file) => return Ok((file_id, file)),
|
||||
Err(err) => error = error.context(err),
|
||||
|
||||
Reference in new issue
Block a user