diff --git a/src/ansys/fluent/core/utils/file_transfer_service.py b/src/ansys/fluent/core/utils/file_transfer_service.py index 5a83a5b427c..2ecc3890cb0 100644 --- a/src/ansys/fluent/core/utils/file_transfer_service.py +++ b/src/ansys/fluent/core/utils/file_transfer_service.py @@ -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