Skip to content

Commit 64ee9e2

Browse files
committed
Replace export path substring with ~ at start only
1 parent ad3aacd commit 64ee9e2

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/window.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,15 @@ def bulk_compress(self, destination_dir: str) -> None:
687687

688688
if host_path:
689689
home_path = GLib.get_home_dir()
690-
displayed_dest_path = host_path.replace(home_path, '~')
690+
691+
if host_path[:len(home_path)] == home_path:
692+
displayed_dest_path = host_path.replace(
693+
home_path,
694+
'~',
695+
1
696+
)
697+
else:
698+
displayed_dest_path = host_path
691699
else:
692700
displayed_dest_path = dest_file.get_path()
693701

0 commit comments

Comments
 (0)