Comment 5 for bug 1141106

Revision history for this message
In , ExecutorElassus (n-andrew-walsh) wrote :

Problem description:

I ran into this problem last year, in the same month, and here I am again. This section of code is in /usr/lib/libreoffice/program/soffice:

---------------------------
# resolve installation directory
sd_cwd="`pwd`"
if [ -h "$0" ] ; then
    sd_basename=`basename "$0"`
     sd_script=`ls -l "$0" | sed "s/.*${sd_basename} -> //g"`
    cd "`dirname "$0"`"
    cd "`dirname "$sd_script"`"
else
    cd "`dirname "$0"`"
fi
sd_prog=`pwd`
cd "$sd_cwd"
-------------------------
The gentoo developers rightly refer to this code as "completely broken", as it causes LibreOffice to puke on launch when trying to determine the month string of its working directory if used on a system for which certain months use non-standard characters.

For instance, in Gremany, the current month is "März." Launching LO any time between now and 2013-04-01 will cause LO to fail with the following error:

-----------------------------
$ libreoffice
ls: error initializing month strings
/usr/bin/libreoffice: line 58: cd: lrwxrwxrwx 1 root root 38 10. Mä/usr/lib64/libreoffice/program: No such file or directory
/usr/bin/libreoffice: line 180: /usr/bin/oosplash: No such file or directory
--------------------------------

Steps to reproduce:
1. set the filesystem locale to German (any variant)
2. try to launch LO in the month of March
3. cry

Current behavior: the launcher pukes

Expected behavior: the launcher could maybe use a coreutil that is pretty good at reading month strings? In any case, it should launch properly.

Cheers,

Operating System: Linux (Other)
Version: 4.0.1.2 release