Unix Build

This commit is contained in:
veeso
2021-06-20 11:29:12 +02:00
parent 89d205e946
commit e3d2151bad
19 changed files with 124 additions and 62 deletions

View File

@@ -77,7 +77,7 @@ impl ScpFileTransfer {
PathBuf::from(path_slash::PathExt::to_slash_lossy(p).as_str())
}
#[cfg(any(target_os = "unix", target_os = "macos", target_os = "linux"))]
#[cfg(any(target_family = "unix", target_os = "macos", target_os = "linux"))]
fn resolve(p: &Path) -> PathBuf {
p.to_path_buf()
}
@@ -1022,7 +1022,7 @@ mod tests {
.stat(PathBuf::from("/config/5t0ca220.log").as_path())
.is_err());
// List dir (dir has 4 (one is hidden :D) entries)
assert_eq!(client.list_dir(&Path::new("/config")).unwrap().len(), 4);
assert!(client.list_dir(&Path::new("/config")).unwrap().len() >= 4);
// Make directory
assert!(client.mkdir(PathBuf::from("/tmp/omar").as_path()).is_ok());
// Make directory (err)