summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-06-18 08:43:14 -0400
committerB Stack <bgstack15@gmail.com>2020-06-18 08:43:14 -0400
commitab0c59df8120cef9b9e487ae88d17399506dfac2 (patch)
tree0e77595bfd48c7fe33c5602423f48b07690a9255
parentMerge branch 'notepadpp-bump' into 'master' (diff)
downloadstackrpms-ab0c59df8120cef9b9e487ae88d17399506dfac2.tar.gz
stackrpms-ab0c59df8120cef9b9e487ae88d17399506dfac2.tar.bz2
stackrpms-ab0c59df8120cef9b9e487ae88d17399506dfac2.zip
irfanview: improve filename handling
fix #21
-rwxr-xr-xirfanview/debian/bin/irfanview-common14
-rw-r--r--irfanview/debian/changelog6
-rwxr-xr-xirfanview/irfanview-common14
-rw-r--r--irfanview/irfanview.spec5
4 files changed, 26 insertions, 13 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};
diff --git a/irfanview/debian/changelog b/irfanview/debian/changelog
index 5c0c4a8..8295178 100644
--- a/irfanview/debian/changelog
+++ b/irfanview/debian/changelog
@@ -1,3 +1,9 @@
+irfanview (4.54-2+devuan) obs; urgency=low
+
+ - Improve filename handling
+
+ -- B Stack <bgstack15@gmail.com> Thu, 18 Jun 2020 08:40:27 -0400
+
irfanview (4.54-1+devuan) obs; urgency=medium
- Version 4.54 Release date: 2019-12-12
diff --git a/irfanview/irfanview-common b/irfanview/irfanview-common
index 6c178fc..9c32c98 100755
--- a/irfanview/irfanview-common
+++ b/irfanview/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};
diff --git a/irfanview/irfanview.spec b/irfanview/irfanview.spec
index 74b44e3..b5dc65d 100644
--- a/irfanview/irfanview.spec
+++ b/irfanview/irfanview.spec
@@ -6,7 +6,7 @@
Name: irfanview
Version: 4.54
-Release: 1
+Release: 2
Summary: irfanview is a graphics viewer
%define version_num %( echo %version | tr -d '\.' )
@@ -204,6 +204,9 @@ update-mime-database -n ${_datadir}/mime 1>/dev/null 2>&1 & :
%{_datadir}/%{name}64
%changelog
+* Thur Jun 18 2020 B Stack <bgstack15@gmail.com> - 4.54-2
+- Improve filename handling
+
* Wed Dec 18 2019 B Stack <bgstack15@gmail.com> - 4.54-1
- version bump
bgstack15