[propsed patch] Fix crash report and log spamming due to missing str.decode()
GUI causes crash report (on Ubuntu with Python 3.10.4-3ubuntu0.1) during startup and .xsession-errors is filled with the following errors:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 239, in update_file_info
path = self._get_path(file)
File "/usr/lib/python3/dist-packages/syncthing_gtk/nautilusplugin.py", line 117, in _get_path
return file.get_location().get_path()
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
Attached patch that fixes the problem.
P.S. The log is also spammed with the following (when the app is not running) but I didn't look into it:
E Daemon g-io-error-quark: Could not connect to 127.0.0.1: Connection refused (39)
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/syncthing_gtk/daemon.py", line 1057, in _connected
self._connection = self.connect_to_service_finish(results)
gi.repository.GLib.GError: g-io-error-quark: Could not connect to 127.0.0.1: Connection refused (39)
E Daemon g-io-error-quark: Could not connect to 127.0.0.1: Connection refused (39)
Edited by Eugene San