Skip to content

Commit 9ee7bcf

Browse files
committed
Enable multi-file extraction with Thunar
Improve the plugin script to support multi-file extraction for both the extract-here and the extract-to actions, in addition to the single-file extraction as before. This closes a request by extremelyonline, github issue #178.
1 parent 506ba14 commit 9ee7bcf

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

xarchiver.tap

+9-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
# $Id$
88
#
9-
# Copyright (c) 2006 Benedikt Meurer <[email protected]>, 2020 Ingo Brückl.
9+
# Copyright (c) 2006 Benedikt Meurer <[email protected]>, 2020-2023 Ingo Brückl.
1010
#
1111
# This program is free software; you can redistribute it and/or modify it
1212
# under the terms of the GNU General Public License as published by the Free
@@ -35,11 +35,17 @@ create)
3535

3636
extract-here)
3737
cd "$folder"
38-
exec xarchiver --ensure-directory "$@"
38+
for archive in "$@"; do
39+
xarchiver --ensure-directory "$archive"
40+
done
3941
;;
4042

4143
extract-to)
42-
exec xarchiver --extract "$@"
44+
if test $# -eq 1; then
45+
exec xarchiver --extract "$@"
46+
else
47+
exec xarchiver --multi-extract "$@"
48+
fi
4349
;;
4450

4551
*)

0 commit comments

Comments
 (0)