Author Topic: Scanning directory names with spaces fail in KDE  (Read 6514 times)

0 Members and 2 Guests are viewing this topic.

Landskap

  • Guest
Scanning directory names with spaces fail in KDE
« on: December 12, 2008, 08:10:55 PM »
Hi all,

I like to use the context menu in KDE's konqueror to scan directories and files using avast for linux.
The konqueror service menu file avast-quickscan.desktop included with avast v1.0.8 reads

[Desktop Action quickscan]
Exec=avastgui --scan-dir=%F
Name=Scan for viruses...
...

So the command executed when I 'right click' is avastgui --scan-dir=%F where %F is resolved by KDE to the actual list of files.
This fails - avastgui aborts- whenever the directory name contains spaces, otherwise it works fine.

I have tried putting "%F", '%F', "%U" and also tried a lot on the command line.
It appears that the avastgui switch --scan-dir cannot handle strings that contain spaces.
I have compared to similar service menu entries, e. g. zip-files, and found that none other uses "=" for their long switches.
So I think it should work if avastgui would change to accept  avastgui --scan-dir %F

Any thoughts or ideas?

Thomas


Offline zilog

  • Avast team
  • Advanced Poster
  • *
  • Posts: 946
  • or #f0; daa; add a,#a0; adc a,#40
Re: Scanning directory names with spaces fail in KDE
« Reply #1 on: December 19, 2008, 12:11:39 PM »
Hi all,

I like to use the context menu in KDE's konqueror to scan directories and files using avast for linux.
The konqueror service menu file avast-quickscan.desktop included with avast v1.0.8 reads

[Desktop Action quickscan]
Exec=avastgui --scan-dir=%F
Name=Scan for viruses...
...

So the command executed when I 'right click' is avastgui --scan-dir=%F where %F is resolved by KDE to the actual list of files.
This fails - avastgui aborts- whenever the directory name contains spaces, otherwise it works fine.

I have tried putting "%F", '%F', "%U" and also tried a lot on the command line.
It appears that the avastgui switch --scan-dir cannot handle strings that contain spaces.
I have compared to similar service menu entries, e. g. zip-files, and found that none other uses "=" for their long switches.
So I think it should work if avastgui would change to accept  avastgui --scan-dir %F

Any thoughts or ideas?

Thomas



Have you tried bare "" quotes?
May's Law: Software efficiency halves every 18 months, compensating Moore's Law. (David May, INMOS)

Offline zilog

  • Avast team
  • Advanced Poster
  • *
  • Posts: 946
  • or #f0; daa; add a,#a0; adc a,#40
Re: Scanning directory names with spaces fail in KDE
« Reply #2 on: December 19, 2008, 12:33:29 PM »
Hi all,

I like to use the context menu in KDE's konqueror to scan directories and files using avast for linux.
The konqueror service menu file avast-quickscan.desktop included with avast v1.0.8 reads

[Desktop Action quickscan]
Exec=avastgui --scan-dir=%F
Name=Scan for viruses...
...

So the command executed when I 'right click' is avastgui --scan-dir=%F where %F is resolved by KDE to the actual list of files.
This fails - avastgui aborts- whenever the directory name contains spaces, otherwise it works fine.

I have tried putting "%F", '%F', "%U" and also tried a lot on the command line.
It appears that the avastgui switch --scan-dir cannot handle strings that contain spaces.
I have compared to similar service menu entries, e. g. zip-files, and found that none other uses "=" for their long switches.
So I think it should work if avastgui would change to accept  avastgui --scan-dir %F

Any thoughts or ideas?

Thomas



hmm,
it seems that double-prefixing would be necessary, due to intermediate evaluation. Try \"%F\"...

from shell's point of view, there must be finally: avastgui --scan-dir="blabla", check with ps -lax | grep avastgui .
if the " disappeared, prefix them (maybe twice, so triple '\' chars, i don't know how many shell evaluations are performed when calling things from KDE Conquerror environment).

regards,
pc
May's Law: Software efficiency halves every 18 months, compensating Moore's Law. (David May, INMOS)

desarrollo.web

  • Guest
Re: Scanning directory names with spaces fail in KDE
« Reply #3 on: January 20, 2009, 07:07:39 AM »
Hi, i have a Acer Aspire One running Fedora 10 KDE Live on HDD. I have installed Avast for Linux, the primary reason to use Avast on Linux is to scan Win32 PC's or HDD's.

When i do scan on Win32 partitions Avast gives a final scan report telling me that there is an error due permissions for each win32 file.

What can i do?  ???

Kind regards,

Att. Roberto Jimenez
desarrollo.web.suscripciones@live.com.mx

Offline zilog

  • Avast team
  • Advanced Poster
  • *
  • Posts: 946
  • or #f0; daa; add a,#a0; adc a,#40
Re: Scanning directory names with spaces fail in KDE
« Reply #4 on: January 20, 2009, 09:37:52 AM »
Hi, i have a Acer Aspire One running Fedora 10 KDE Live on HDD. I have installed Avast for Linux, the primary reason to use Avast on Linux is to scan Win32 PC's or HDD's.

When i do scan on Win32 partitions Avast gives a final scan report telling me that there is an error due permissions for each win32 file.

What can i do?  ???

Kind regards,

Att. Roberto Jimenez
desarrollo.web.suscripciones@live.com.mx

Hallo,
just make sure the mounted volume is accessible for the user who runs avastgui. Yes, Win-world uses filesystems with poor acces right model, but you can "chmod" the whole mounted volume - use "uid=" mount option.

Personally, I use this (for VFAT, for NTFS uid= and umask= work as well): -o umask=022,uid=zilog,quiet,showexec
man mount :)

regards,
pc
May's Law: Software efficiency halves every 18 months, compensating Moore's Law. (David May, INMOS)