Vous êtes ici > Bugs > PlayOnLinux > Bug > Ticket #1018 en

Bug #1018 sur PlayOnLinux

Files not correctly invoqued by POL shortcuts

Ajouté par boudoi_b le 2012-06-21 11:46:34 - Commenter ou mettre à jour ce ticket

Statut :
Résolu
Priorité :
Faible
Assigné à :
Dernière mise à jour :
2012-07-27 17:37:24
Description, étapes pour reproduire :
Hi,

I've seen a bug in the shortcut creation, that might be global but I used POL only for MS Office.

When you launch the programm, the script ends by
POL_Wine "[my_program]" "$@"

But "$@" will reffers to a file in the Unix tree, not in the Wine tree.
I fixed it by add a :
for FILE in $@
do
   if [ -f "$FILE" ]
   then
      FILES="z:$FILE" # z: is a link to /
   fi
done

and replace the last $@ by "$FILES".

History

Mise à jour par Quentin PÂRIS le 2012-06-21 11:56:29

This is not a bug, indeed, some arguments are not paths.

Your code would bug for exemple if you run ./Word2003 ./file.doc. The script would understand ./Word2003 z:./file.doc, which is obviously wrong.

That is mostly the reason why we do not add this into code POL, we consider that it is a dirty hack.

However, POL 4.1.1 can handle file extensions. Just set ".docx" files to Word 2010 (for exemple) in PlayOnLinux Options -> File associations.

Then, run "playonlinux file.docx" (Or assign your doc file to PlayOnLinux instead of assigning them to the word shortcut), and it will work

Mise à jour par boudoi_b le 2012-06-21 12:11:08

I know it's dirty, it dit it because I'm absolutly sure that my users will not launch files by command line or scripts, only by a Linux filebrowser.

By the way, I haven't shown the "File associations" and it works pretty well.

Sorry for the inconvenience,

Mise à jour par Quentin PÂRIS le 2012-06-21 13:26:21

I thin we could add something like

if [ -f "$file" ] && [ "${file:1}" = "/" ]; then
 file="z:$file"
fi

I'm not closing the bug in order to to study the question

Mise à jour par Quentin PÂRIS le 2012-07-27 17:37:24

  • Statut changé vers Résolu

Fixed in 4.1.4-dev

Il n'y a rien à voir ici