Skip to content

Commit

Permalink
Properly convert paths to file uris
Browse files Browse the repository at this point in the history
  • Loading branch information
lvxnull committed Aug 12, 2024
1 parent 544ff0b commit ab94d30
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions nautilus_open_any_terminal/nautilus_open_any_terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@
from os.path import expanduser
from subprocess import Popen
from typing import Optional

try:
from urllib import unquote # type: ignore

from urlparse import urlparse
except ImportError:
from urllib.parse import unquote, urlparse
from urllib.parse import quote, unquote, urlparse

from gi import get_required_version, require_version

Expand Down Expand Up @@ -465,7 +459,7 @@ def _menu_dir_activate_cb(self, menu, file_, remote: bool):
if remote:
open_remote_terminal_in_uri(file_.get_uri())
else:
open_local_terminal_in_uri(file_.get_location().get_path())
open_local_terminal_in_uri("file://" + quote(file_.get_location().get_path()))

def _menu_exe_activate_cb(self, menu, file_, remote: bool):
if remote:
Expand Down

0 comments on commit ab94d30

Please sign in to comment.