Skip to content

Commit b34419e

Browse files
chikoskivados-cosmonic
authored andcommitted
Switch file system API from std::fs to tokio::fs to
1 parent 7c6cb97 commit b34419e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

crates/wkg/src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{fs, io::Seek, path::PathBuf};
1+
use std::{io::Seek, path::PathBuf};
22

33
use anyhow::{ensure, Context};
44
use clap::{Args, Parser, Subcommand, ValueEnum};
@@ -360,8 +360,8 @@ impl GetArgs {
360360
let output_trailing_slash = self.output.as_os_str().to_string_lossy().ends_with('/');
361361
let parent_dir = if output_trailing_slash {
362362
let parent_dir = self.output.as_path();
363-
if !fs::exists(parent_dir)? {
364-
fs::create_dir_all(parent_dir)
363+
if !tokio::fs::try_exists(parent_dir).await? {
364+
tokio::fs::create_dir_all(parent_dir).await
365365
.context("Failed to create output dir")?
366366
}
367367
parent_dir

0 commit comments

Comments
 (0)