apache / airavata-mft

Apache Airavata Managed File Transfer Services
https://airavata.apache.org
Apache License 2.0
32 stars 39 forks source link

MFT Copy command shows wrong count of files while making transfer #87

Closed ub0005 closed 7 months ago

ub0005 commented 1 year ago

Description: Command: mft cp source_storage_name/path destination_storage_name/path on executing the above command it prints the below questionnaire A total number of 2 files to be transferred. Total volume is 91808874 bytes. Do you want to start the transfer? [Y/n]:

Here actually the number of transferred files is 1 but the logs show 2 files as a count.

Steps to reproduce:

Expected Behaviour: The count should be logged as the actual count of files being transferred.

Environment:: M2 Mac

ub0005 commented 1 year ago

while using the MFT cp command it always shows the total number of files to be transferred as (count of total files + 1) This is because while flattening the directories it's adding the source and destination directories as one endpoint.

example: [sourcePath: "source/" destinationPath: "destination/source" , sourcePath: "source/testfile.1" destinationPath: "destination/testfile.1" , sourcePath: "source/testfile.2" destinationPath: "destination/testfile.2" , sourcePath: "source/testfile.3" destinationPath: "destination/testfile.3" , sourcePath: "source/testfile.4" destinationPath: "destination/testfile.4" , sourcePath: "source/testfile.5" destinationPath: "destination/testfile.5" ]

Because of this the failed count always shows 1 in the terminal as well as in the logs.

DImuthuUpe commented 7 months ago

Closing this as the issue was fixed