Red Hat Bugzilla – Bug 20010
desktopconv seg faults and deletes files
Last modified: 2008-05-01 11:37:59 EDT
I downloaded the KDE 2.0 RPMs built by porky.devel.redhat.com
I installed KDE2.0 on two RedHat 7.0 machines - the first was a test
machine, reformatted hard drive, fresh install of RH7; the second was a
machine upgraded from RH6.2.
On both machines, when the the kdesupport package was installed, RPM
complained of a post-install error, and that the desktopconv program had
crashed with a seg fault.
At first, I didn't think anything of it, because it didn't hurt anything on
the first machine. However, on the second machine, which is my main one,
it didn't take long for me to notice that about 1GB of very important files
were deleted from my hard drive.
There were two folders that I had on my desktop from KDE 1.1.2 - one was a
real directory, the other a symlink to another directory elsewhere in my
home directory. The desktopconv program recursively deleted everything in
those directories. Needless to say, I was a bit upset.
Normally I would back up any important configuration files that I think
would be overwritten by an RPM, which doesn't include files in a user's
home directory, so I lost all the data.
The desktopconv program should be (1) fixed so it doesn't seg fault, and
(2) should not be run in a post-install script of an RPM. It should first
warn the user what it's about to do and give the user a chance to stop and
make a backup first. Documentation would be nice to explain exactly what
the desktopconv program does.
I originally sent this bug report to bugs.kde.org, but they pointed out
that RedHat created the RPMs, so I am posting it here.
desktopconv is supposed to translate the old kde config files to new (2.x)
ones, so you get to keep the mcons you put in the panel and stuff.
I wasn't aware of the problem of deleting files it doesn't recognize; I'll fix
I can't reproduce the problem of files being deleted...
By any chance, are the files still there and located at ~/.kde/Desktop as opposed to ~/Desktop?
The segmentation fault is fixed.
Ahhh! I found my missing files in ~/.kde/Desktop
Thank you very much!
In any case, a manpage or somesuch on the desktopconv program would be nice, so
people can find their "missing" files when they are moved.
All is not well.
As I indicated in the previous comment, I found the "missing" files in
.kde/Desktop, however, when I went to use the files, I found almost all of them
to be corrupted. The only files that survived were the plain ASCII text files.
All of my multimedia files (MP3, MPEG 1 movies, MIDI files, WAVE files, etc) are
corrupted (and significantly smaller, which explains the sudden increase in free
space reported by df).
The files are partially intact, though, as the 'file' command can read the magic
and report some information about the files:
[jmbastia@quentin MOLM]$ file pic01.jpg
pic01.jpg: JPEG image data
[jmbastia@quentin MOLM]$ display pic01.jpg
display: Corrupt JPEG image (pic01.jpg) [No such file or directory].
I tried using ImageMagick and The Gimp to look at the pictures, and neither were
successful. I even rebooted into Windows to see if it would have any luck -
nothing. The files are all bad.
I trust it was the seg fault that corrupted these files, and that by fixing the
seg fault this won't happen to other people.
Created attachment 4795 [details]
tarball of pic01.jpg (corrupted file) and pic01-good.jpg (good copy of same file)
Old versions of desktopconv touched a couple of files it was supposed to leave alone (desktopconv strips off old cruft like "# KDE Config File", or replacing "[KDE Desktop Entry]" with "[Desktop Entry]").
The Desktop directory was never meant to contain actual files, so I assumed everything in there is a .kdelnk to a real file/directory when I wrote desktopconv. This is fixed in the current version.
I see the problem of followed symlinks and files moved from ~/Desktop to
~/.kde/Desktop also with kdesupport-2.0-5. Isn't it supposed to be the latest