Stunkymonkey / nautilus-open-any-terminal

GNU General Public License v3.0
568 stars 59 forks source link

Fails with afc paths #155

Open acheong08 opened 6 months ago

acheong08 commented 6 months ago

Example:

afc://00008030-001675AC2209802E:3/com.leshko.cloudplayer/_downloads

This happens when you plug in an iPhone.

Traceback (most recent call last):
  File "/home/acheong/.local/share/nautilus-python/extensions/nautilus_open_any_terminal.py", line 285, in _menu_activate_cb
    open_terminal_in_uri(file_.get_uri())
  File "/home/acheong/.local/share/nautilus-python/extensions/nautilus_open_any_terminal.py", line 201, in open_terminal_in_uri
    Popen(cmd, cwd=filename)  # pylint: disable=consider-using-with
    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib64/python3.12/subprocess.py", line 1953, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/com.leshko.cloudplayer/_downloads'
lvxnull commented 4 months ago

Sorry for the late response, but im not familiar with how afc paths work. If you know how to determine the actual mount path from an afc path, please share it and i'll make a PR where i implement this feature.