Skip to content

Commit

Permalink
refactor remote fts 3
Browse files Browse the repository at this point in the history
  • Loading branch information
hpohekar committed Apr 19, 2024
1 parent 0991a2a commit 287c3aa
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions src/ansys/fluent/core/utils/file_transfer_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,24 +111,15 @@ def _get_files(
if isinstance(file_name, (str, pathlib.PurePath)):
file_name = pathlib.Path(file_name)
file_path_check = os.path.join(path, file_name.name)
files = (
[file_path_check]
if (
os.path.isfile(file_path_check)
and os.path.samefile(file_path_check, file_name)
)
else [file_name]
)
files = [file_path_check] if os.path.isfile(file_path_check) else [file_name]
elif isinstance(file_name, list):
files = []
for file in file_name:
file_path_check = os.path.join(path, os.path.basename(file))
if os.path.isfile(file_path_check) and os.path.samefile(
file_path_check, file
):
files.append(str(file_path_check))
if os.path.isfile(file_path_check):
files.append(file_path_check)
else:
files.append(str(file))
files.append(file)
return files


Expand Down

0 comments on commit 287c3aa

Please sign in to comment.