summaryrefslogtreecommitdiff
path: root/irfanview/debian/bin/irfanview-common
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-06-26 20:01:27 +0000
committerB Stack <bgstack15@gmail.com>2020-06-26 20:01:27 +0000
commita98ec866efccba579ad13f0fa49f7ad09ec7dc9d (patch)
tree8c83e4b51b28c897d01e83c02efe58150fc0a35c /irfanview/debian/bin/irfanview-common
parentMerge branch 'notepadpp-bump' into 'master' (diff)
parentadd txt2man build-dep (diff)
downloadstackrpms-a98ec866efccba579ad13f0fa49f7ad09ec7dc9d.tar.gz
stackrpms-a98ec866efccba579ad13f0fa49f7ad09ec7dc9d.tar.bz2
stackrpms-a98ec866efccba579ad13f0fa49f7ad09ec7dc9d.zip
Merge branch 'irfanview-bump' into 'master'
fix irfanview invocation Closes #21 See merge request bgstack15/stackrpms!163
Diffstat (limited to 'irfanview/debian/bin/irfanview-common')
-rwxr-xr-xirfanview/debian/bin/irfanview-common14
1 files changed, 8 insertions, 6 deletions
diff --git a/irfanview/debian/bin/irfanview-common b/irfanview/debian/bin/irfanview-common
index 6c178fc..9c32c98 100755
--- a/irfanview/debian/bin/irfanview-common
+++ b/irfanview/debian/bin/irfanview-common
@@ -11,6 +11,7 @@
# 2019-06-16 remove DEVTTY in favor of just showing on current tty
# 2019-06-16 replace winepath call with wine $WINEPATH_BIN
# 2019-06-16 split into package-arch-specific and common scripts
+# 2020-05-20 handle multiple filenames correctly now, including removing \r from winepath output
# Usage:
# called from irfanview (which is symlink to irfanview32 or ifanview64)
# Do not use this by itself.
@@ -24,7 +25,7 @@ then
false
else
-IV_VERSION="2019-06-16b"
+IV_VERSION="2020-05-20a"
# Define functions
expandword() {
@@ -60,9 +61,10 @@ expandword() {
;;
*)
# assume it is readable and add it to list of files to open
- echo "File ${_word}"
+ echo "File:1 ${_word}"
thisfile="$( getwinepath "${_word}" )"
- irfanfiles="${irfanfiles} ${thisfile}"
+ echo "File:2 ${thisfile}"
+ irfanfiles="${irfanfiles} '${thisfile}'"
;;
esac
fi
@@ -84,12 +86,12 @@ for word in "${@}";
do
expandword "${word}"
done
-irfanfiles="${irfanfiles## }"
+irfanfiles="$( echo "${irfanfiles## }" | sed -r -e 's/\r//g;' )"
# run wine
cd $WINEPREFIX
-printf wine "${IV_EXEC_PATH}" ${irfanargs} ${irfanfiles}
-wine "${IV_EXEC_PATH}" ${irfanargs} ${irfanfiles} &
+echo wine "${IV_EXEC_PATH}" ${irfanargs} ${irfanfiles}
+eval wine \"${IV_EXEC_PATH}\" "${irfanargs}" "${irfanfiles}" &
wait %1
for thistempdir in ${alltempdirs};
bgstack15