Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions crates/cli/src/commands/cp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1156,6 +1156,22 @@ mod tests {
assert!(result.is_err());
}

#[cfg(unix)]
#[tokio::test]
async fn download_destination_rejects_existing_symlink_file() {
use std::os::unix::fs::symlink;

let root = tempfile::tempdir().expect("create destination root");
let outside = tempfile::tempdir().expect("create outside directory");
let outside_file = outside.path().join("file.txt");
std::fs::write(&outside_file, b"outside").expect("write outside file");
symlink(&outside_file, root.path().join("file.txt")).expect("create test symlink");

let result = safe_download_destination(root.path(), &PathBuf::from("file.txt")).await;

assert!(result.is_err());
}

#[test]
fn test_select_upload_content_type_uses_guess_for_small_files() {
let selected =
Expand Down
Loading