Skip to content

Commit

Permalink
src/transfers.py: Follow toplevel symbolic links when gathering
Browse files Browse the repository at this point in the history
files to send.

Previous behavior was to never follow links, under any conditions.

Now if the file selection contains a symbolic link, the link will
be followed, and the linked-to files will be sent in place of
the link.

This does not alter any existing behavior with links inside of
folders - these will never be followed, and the link itself will
be sent instead.

Fixes: #212
  • Loading branch information
mtwebster committed Apr 21, 2024
1 parent 4bb54c7 commit 6a1101c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transfers.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def process_folder(folder_uri, top_dir):
file = Gio.File.new_for_uri(uri)
top_dir_basenames.append(file.get_basename())

info = file.query_info(infos, Gio.FileQueryInfoFlags.NOFOLLOW_SYMLINKS, None)
info = file.query_info(infos, Gio.FileQueryInfoFlags.NONE, None)
basename = file.get_basename()
if len(uri_list) == 1:
op.mime_if_single = info.get_attribute_string(Gio.FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE)
Expand Down

0 comments on commit 6a1101c

Please sign in to comment.