We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c3124e1 + 689b8de commit ae51ce3Copy full SHA for ae51ce3
crates/common/tedge_utils/src/fs.rs
@@ -1,4 +1,3 @@
1
-use nix::NixPath;
2
use std::fs as std_fs;
3
use std::io::Read;
4
use std::io::Write;
@@ -170,7 +169,7 @@ pub async fn atomically_write_file_async(
170
169
fn parent_dir(file: &Path) -> PathBuf {
171
match file.parent() {
172
None => Path::new("/").into(),
173
- Some(path) if path.is_empty() => Path::new(".").into(),
+ Some(path) if nix::NixPath::is_empty(path) => Path::new(".").into(),
174
Some(dir) => dir.into(),
175
}
176
0 commit comments