From: Nathan Pratta Teodosio Date: Fri, 26 Aug 2022 18:03:03 +0000 (-0300) Subject: Fix compatibility with newer python3-nautilus X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~11^2~175^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=2ba08206af799acba76fd93fed50cbdba798d498;p=nextcloud-desktop.git Fix compatibility with newer python3-nautilus Signed-off-by: Nathan Pratta Teodosio --- diff --git a/shell_integration/nautilus/syncstate.py b/shell_integration/nautilus/syncstate.py index c4dacb5b0..f5116d183 100644 --- a/shell_integration/nautilus/syncstate.py +++ b/shell_integration/nautilus/syncstate.py @@ -200,9 +200,13 @@ class MenuExtension_ownCloud(GObject.GObject, Nautilus.MenuProvider): break return (topLevelFolder, internalFile) - def get_file_items(self, window, files): + # The get_file_items method of Nautilus.MenuProvider no longer takes + # the window argument. To keep supporting older versions of Nautilus, + # we can use variadic arguments. + def get_file_items(self, *args): # Show the menu extension to share a file or folder + files = args[-1] # Get usable file paths from the uris all_internal_files = True for i, file_uri in enumerate(files):