We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b5137f commit 0107c79Copy full SHA for 0107c79
netmiko/scp_handler.py
@@ -271,7 +271,8 @@ def remote_file_size(
271
remote_out = "".join(remote_out_lines)
272
# Match line containing file name
273
assert isinstance(remote_file, str)
274
- escape_file_name = re.escape(remote_file)
+ remote_file_base = os.path.basename(remote_file)
275
+ escape_file_name = re.escape(remote_file_base)
276
pattern = r".*({}).*".format(escape_file_name)
277
match = re.search(pattern, remote_out)
278
if match:
0 commit comments