Skip to content

Commit aba3ccf

Browse files
committed
Edit explorer.py
1 parent e9b13f9 commit aba3ccf

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

share/plug-ins/explorer.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,19 @@ def can_execute(context):
2222

2323
@interactive(
2424
name="Open in system file explorer",
25-
contextual="Open explorer",
25+
contextual="Open in system file explorer",
2626
filter=can_execute
2727
)
2828
def on_activate():
2929
restored = os.environ.copy()
30-
for k in os.environ.keys():
30+
for k in os.environ:
3131
if k.startswith("GPS_STARTUP_"):
32-
if gps[k] != "_ABSENT_VARIABLE_":
33-
restored[k[12:]] = os.environ[k]
32+
old = k[12:]
33+
if os.environ[k] == "_ABSENT_VARIABLE_":
34+
if old in restored.keys():
35+
restored.pop(old)
36+
else:
37+
restored[old] = os.environ[k]
3438

3539
path = GPS.current_context().directory()
3640

0 commit comments

Comments
 (0)