Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in handling of subdirectories in remote_file_size #3199

Merged
merged 3 commits into from
Jun 9, 2023

Conversation

dystland
Copy link
Contributor

@dystland dystland commented May 5, 2023

Fixes bug described in #2168

The remote_file variable contains the path of the remote file, including parent directories. However, the output from dir only contains the filename without parent directories.

This fix utilizes os.path.basename to extract the filename from remote_file into remote_file_base and use that as the pattern when looking for the file size in the dir output.

@dystland dystland changed the title Fix bug in handling of subdirectories in remote_file_size #2168 Fix bug in handling of subdirectories in remote_file_size May 5, 2023
@ktbyers
Copy link
Owner

ktbyers commented Jun 9, 2023

Thanks @dystland

@ktbyers ktbyers merged commit 0107c79 into ktbyers:develop Jun 9, 2023
muffi-dn pushed a commit to drivenets/netmiko that referenced this pull request Jul 3, 2023
ktbyers#3199)

Co-authored-by: Lars Erik Dystland <lars.erik.dystland@kongsbergdigital.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants