Bug 20010 - desktopconv seg faults and deletes files
Summary: desktopconv seg faults and deletes files
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kdesupport   
(Show other bugs)
Version: 7.0
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2000-10-29 21:44 UTC by jmbastia
Modified: 2008-05-01 15:37 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-10-30 23:48:59 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
tarball of pic01.jpg (corrupted file) and pic01-good.jpg (good copy of same file) (50.00 KB, application/octet-stream)
2000-10-30 23:48 UTC, jmbastia
no flags Details

Description jmbastia 2000-10-29 21:44:23 UTC
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.

Comment 1 Bernhard Rosenkraenzer 2000-10-29 21:58:34 UTC
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 
that ASAP.

Comment 2 Bernhard Rosenkraenzer 2000-10-30 11:17:30 UTC
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.

Comment 3 jmbastia 2000-10-30 21:40:00 UTC
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.

Comment 4 jmbastia 2000-10-30 23:38:50 UTC
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.

Comment 5 jmbastia 2000-10-30 23:48:56 UTC
Created attachment 4795 [details]
tarball of pic01.jpg (corrupted file) and pic01-good.jpg (good copy of same file)

Comment 6 Bernhard Rosenkraenzer 2000-11-03 09:43:34 UTC
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.

Comment 7 Luca Bonomi 2000-11-08 13:18:56 UTC
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

Note You need to log in before you can comment on or make changes to this bug.