mirror of
https://github.com/veeso/termscp.git
synced 2026-09-27 06:21:22 -07:00
fix(transfer): enqueue full destination path instead of directory
Queued transfers stored only the destination directory as the target path. Downstream upload logic treats the queued destination as the full file path and passes it straight to create_file, so transfers failed with a Failure error when the remote target resolved to a directory. Append each entry's file name to the destination directory at enqueue time in both enqueue_file and enqueue_all, matching the single-file transfer path which already builds the full target path.
This commit is contained in:
@@ -355,7 +355,12 @@ impl FileTransferActivity {
|
||||
self.browser.explorer_mut().dequeue(&src);
|
||||
} else {
|
||||
debug!("Marking file {}", src.display());
|
||||
let dest = self.browser.other_explorer_no_found().wrkdir.clone();
|
||||
// Destination is the other pane's working directory joined with the file
|
||||
// name, so the queued entry holds the full target path (not just the dir).
|
||||
let mut dest = self.browser.other_explorer_no_found().wrkdir.clone();
|
||||
if let Some(name) = src.file_name() {
|
||||
dest.push(name);
|
||||
}
|
||||
self.browser.explorer_mut().enqueue(&src, &dest);
|
||||
}
|
||||
self.reload_browser_file_list();
|
||||
|
||||
Reference in New Issue
Block a user