Bug 145060 - games-board/cgoban2 command parameters not escaped
Bug#: 145060 Product:  Gentoo Linux Version: unspecified Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: games@gentoo.org Reported By: gbin-gentoo@gootz.net
Component: Games
URL: 
Summary: games-board/cgoban2 command parameters not escaped
Keywords:  
Status Whiteboard: 
Opened: 2006-08-25 03:30 0000
Description:   Opened: 2006-08-25 03:30 0000
If you try to associate your sgf files with for example :
/usr/games/bin/cgoban2 %f
or /usr/games/bin/cgoban2 '%f' or /usr/games/bin/cgoban2 "%f" or
/usr/games/bin/cgoban2 -edit %f etc ... it won't work with files paths with
spaces like : 
/var/gbin/go/Games base/Go Game World - pro commented/ggw-1234.sgf

Perharps a default association for KDE would be nice to setup with text/sgf
(should be exactly the same thing as qgo)

---

I made this workaround but it is not elegant.

#!/bin/sh
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-board/cgoban2/files/cgoban2,v 1.3
2004/07/14 22:14:02 agriffis Exp $

if [ -n '$*' ]; then
        which java > /dev/null 2>&1 && \
                java -jar /usr/share/games/cgoban2/cgoban.jar "$*" && \
                exit 0
fi
        which java > /dev/null 2>&1 && \
                java -jar /usr/share/games/cgoban2/cgoban.jar && \
                exit 0

echo "No \"java\" binary found in your PATH."
echo "You should run \"java-config\" to choose your default VM."
exit 1

------- Comment #1 From Mr. Bones. 2006-08-28 22:12:19 0000 -------
resync/remerge and try it again.