mirror of
https://github.com/veeso/termscp.git
synced 2025-12-06 17:15:35 -08:00
fix: Report a message while calculating total size of files to transfer. (#362)
* fix: Report a message while calculating total size of files to transfer. Currently, in case of huge transfers the app may look frozen while calculating the transfer size. We should at least report to the user we are actually doing something. closes #361 * ci: windows runner
This commit is contained in:
committed by
GitHub
parent
205d2813ad
commit
05c8613279
2
.github/workflows/windows.yml
vendored
2
.github/workflows/windows.yml
vendored
@@ -15,7 +15,7 @@ env:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-2019
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
@@ -49,6 +49,7 @@ Released on 20/09/2025
|
||||
- [Issue 356](https://github.com/veeso/termscp/issues/356): Fixed SSH auth issue not trying with the password if any RSA key was found.
|
||||
- [Issue 334](https://github.com/veeso/termscp/issues/334): SMB support for MacOS with vendored build of libsmbclient.
|
||||
- [Issue 337](https://github.com/veeso/termscp/issues/337): Migrated to libssh.org on Linux and MacOS for better ssh agent support.
|
||||
- [Issue 361](https://github.com/veeso/termscp/issues/361): Report a message while calculating total size of files to transfer.
|
||||
|
||||
## 0.18.0
|
||||
|
||||
|
||||
@@ -1260,7 +1260,10 @@ impl FileTransferActivity {
|
||||
|
||||
/// Get total size of transfer for host_bridgehost
|
||||
fn get_total_transfer_size_host(&mut self, entry: &File) -> usize {
|
||||
if entry.is_dir() {
|
||||
// mount message to tell we are calculating size
|
||||
self.mount_blocking_wait("Calculating transfer size…");
|
||||
|
||||
let sz = if entry.is_dir() {
|
||||
// List dir
|
||||
match self.host_bridge.list_dir(entry.path()) {
|
||||
Ok(files) => files
|
||||
@@ -1281,12 +1284,18 @@ impl FileTransferActivity {
|
||||
}
|
||||
} else {
|
||||
entry.metadata.size as usize
|
||||
}
|
||||
};
|
||||
self.umount_wait();
|
||||
|
||||
sz
|
||||
}
|
||||
|
||||
/// Get total size of transfer for remote host
|
||||
fn get_total_transfer_size_remote(&mut self, entry: &File) -> usize {
|
||||
if entry.is_dir() {
|
||||
// mount message to tell we are calculating size
|
||||
self.mount_blocking_wait("Calculating transfer size…");
|
||||
|
||||
let sz = if entry.is_dir() {
|
||||
// List directory
|
||||
match self.client.list_dir(entry.path()) {
|
||||
Ok(files) => files
|
||||
@@ -1307,7 +1316,11 @@ impl FileTransferActivity {
|
||||
}
|
||||
} else {
|
||||
entry.metadata.size as usize
|
||||
}
|
||||
};
|
||||
|
||||
self.umount_wait();
|
||||
|
||||
sz
|
||||
}
|
||||
|
||||
// file changed
|
||||
|
||||
Reference in New Issue
Block a user