Bug 60182

Summary: Rotate Image does not work in directories with spaces in their names
Product: [Applications] konqueror Reporter: Bjoern Wolf <bjoern.wolf>
Component: generalAssignee: Konqueror Developers <konq-bugs>
Status: RESOLVED WORKSFORME    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Bjoern Wolf 2003-06-21 13:10:39 UTC
Version:            (using KDE KDE 3.1.2)
Installed from:    Debian testing/unstable Packages
Compiler:          gcc version 3.3 (debian) 
OS:          Linux

When right clicking on an image file in konqeror I can select an item from the context menu called "Im Uhrzeigersinn rotieren" (german for "rotate clockwise").

When I apply this to the image 

file:/home/bjoern/data/grafigs/fotos/2003-03 Suedamerika/Img_1165.jpg

it doesn't do anything. Renaming the folder to "2003-03-Suedamerika", i.e. replacing the space by a hyhphen, giving

file:/home/bjoern/data/grafigs/fotos/2003-03-Suedamerika/Img_1165.jpg

helps: the image is rotated properly.

Therefore it seems to me that this feature doesn't handle spaces in filenames properly.
Comment 1 Bjoern Wolf 2003-06-21 13:50:35 UTC
Oh, further investigation revealed that the "Rotate" menu is a knoppix-specific 
servicemenu. So I fixed it and reported the fix to the appropriate person from 
the KOPPIX team 
Comment 2 Thiago Macieira 2003-06-21 14:22:07 UTC
We do have a rotate menu in our KDE releases. That means we would be 
interested in your fix as well ;-) 
Comment 3 Bjoern Wolf 2003-06-24 22:31:28 UTC
Well, the corresponding Knoppix service menus are  
	/usr/share/apps/konqueror/servicemenus/rotate_jpg.desktop  
	/usr/share/apps/konqueror/servicemenus/rotate_png.desktop  
referring to  
	Exec=jpegtran-wrapper %u -rotate 270  
(and so on) aka  
	/usr/bin/jpegtran-wrapper,  
a script containing the following lines  
  
	#!/bin/bash  
	FILE="$1"  
	shift  
	jpegtran "$@" -copy all -outfile "$FILE.tmp$$" "$FILE" && mv -f  
"$FILE.tmp$$" "$FILE"  
  
I simply sorrounded the parms of jpegtran by quotes (exactly as quoted above).  
That's all.