Bug 302415

Summary: dolphin copy folder corrupts file md5sum
Product: [Unmaintained] kio Reporter: Alexander <alexander.nofamilyname>
Component: generalAssignee: David Faure <faure>
Status: RESOLVED WORKSFORME    
Severity: critical CC: adawit, adrian, axel.carl.mueller, cfeck, frank78ac
Priority: NOR Keywords: triaged
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Debian unstable   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: screen of the changed md5sum

Description Alexander 2012-06-23 17:54:52 UTC
When i copy a folder with ( ) in it which also contains a movie, the copied movie has another md5sum afterwards and also displays artifacts. A copy in the shell with "cp -a" does not produce this error. Have not tried it with other files yet.

Reproducible: Always

Steps to Reproduce:
1.Create Folder with ( ) in it. With a big avi or mkv file.
2.Copy the folder it to another folder.
3.Check the md5sum of the avi file in it.
Actual Results:  
md5sum is changed

Expected Results:  
md5sum should be the same

I'm using an encrypted md1 raid on my system. Do not know if this matters or not.
Comment 1 Alexander 2012-06-23 17:55:59 UTC
Created attachment 72077 [details]
screen of the changed md5sum
Comment 2 Christoph Feck 2012-06-23 18:41:44 UTC
Does the new file have the same size as the original file?
Comment 3 Alexander 2012-06-23 18:47:41 UTC
(In reply to comment #2)
> Does the new file have the same size as the original file?
Yes it does have exactly the same size, it is not a partial copy or something like that.
I cant reproduce it with all files/folders but with some all the time.
Comment 4 Myriam Schweingruber 2012-06-24 16:08:04 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > Does the new file have the same size as the original file?
> Yes it does have exactly the same size, it is not a partial copy or
> something like that.
> I cant reproduce it with all files/folders but with some all the time.

What type of files are these "some" you can reproduce this with all the time?
Comment 5 Alexander 2012-06-24 17:47:55 UTC
> What type of files are these "some" you can reproduce this with all the time?
What normally gives this error is downloading a movie with Ktorrent, then after the download is finished (Ktorrent is definitely not running anymore), then copy the whole folder to another location. If i copy only the movie file the md5sum is not changed. Tried it for example with the Big Bucks Bunnie movie.
Comment 6 Alexander 2012-06-28 18:18:15 UTC
Today it happened on an album and the only file corrupted from the tracks was the one containing () in it.
Comment 7 Jeroen van Meeuwen (Kolab Systems) 2012-08-24 16:18:31 UTC
Resetting assignee to default as per bug #305719
Comment 8 Adrián Chaves (Gallaecio) 2012-12-02 12:25:52 UTC
I cannot reproduce this. Could you please try with a newer version of Dolphin?

A bit more detailed steps:
1. Download the Big Buck Bunny torrent. Magnet link: magnet://?xt=urn:btih:88b2c9fa7d3493b45130b2907d9ca31fdb8ea7b9&dn=Big+Buck+Bunny+1080p&tr=udp%3A%2F%2Ftracker.openbittorrent.com%3A80&tr=udp%3A%2F%2Ftracker.publicbt.com%3A80&tr=udp%3A%2F%2Ftracker.istole.it%3A6969&tr=udp%3A%2F%2Ftracker.ccc.de%3A80
2. Once downloaded, check the MD5 of the movie file (“md5sum *.avi” inside the torrent folder). It will be ‘223991c8b33564eb77988a4c13c1c76a’.
3. Copy the downloaded folder inside a test folder (e.g. ‘~/bug302415’).
4. Rename this copied folder into something with “()” in it. For example: “Big Buck Bunny (surround)”.
5. Get the MD5 of the movie file inside. It will still be ‘223991c8b33564eb77988a4c13c1c76a’, as expected.
6. From the test folder, copy the renamed folder (“Big Buck Bunny (surround)”) and paste in the place. You will be asked to choose a name for the new folder, so choose some variation still with “()” in it (e.g. ‘Big Buck Bunny asdf (surround)’). Wait for the copy process to finish.
7. Check the MD5 of the movie file inside ‘Big Buck Bunny asdf (surround)’. You can actually compare both folders easily by running “md5sum */*” from the test folder.

Expected results: the MD5 sums are the same. They are for me.

I did noticed an odd behavior: the info panel shows far less details for the movie files in the testcase folder (only that it’s AVI, the size and the modification date). But that’s not the point of this report.
Comment 9 Axel Müller 2013-04-10 13:42:05 UTC
I encountered similar problems during file copying. I think the problem is not related to any files/folders with "()" in their name. The problem occurred only for me when I copy large files (several hundred MBs) over the network. I could reproduce it with a samba share and an OpenAFS network volume. In both cases, the target file has the wrong md5sum. I compared the bytes of the original and the (corrupt) target file and it was obvious that the block ordering was incorrect.
e.g.
Original
Block 1,2,3,4,..
Target
Block 1,4,3,2,..

Thus, file size is still correct but md5sum not.
Comment 10 Frank Reininghaus 2013-04-10 13:48:29 UTC
Thanks for the comments. Like Adrián, I have not seen the problem myself yet. In any case, it's most likely not a Dolphin issue because Dolphin does not do the actual copying itself. KIO and the kioslaves are responsible for this -> reassigning.
Comment 11 Axel Müller 2013-04-15 07:20:25 UTC
(In reply to comment #9)
I am using KDE 4.8.5 (Kubuntu 12.04).
Comment 12 Dawit Alemayehu 2013-07-06 04:57:32 UTC
I tried this from a samba share, but I am unable to duplicate this problem. Do you still have this issue with the latest stable version of KDE, v4.10 or higher?
Comment 13 Axel Müller 2013-07-08 07:30:29 UTC
(In reply to comment #12)
> I tried this from a samba share, but I am unable to duplicate this problem.
> Do you still have this issue with the latest stable version of KDE, v4.10 or
> higher?
Unfortunately, I cannot update to v4.10 (still on Kubuntu 12.04). But I rerun my tests. So far the copied files were *not* corrupted using a smb share. But I experienced corruption (wrong md5sum) in case of a OpenAFS share. The OpenAFS share is mounted into my local file system. Copying from the command line does work w/o any file corruption. Only copying from within Dolphin does not work. Perhaps Dolphin does not recognize the folder as a mounted network share and therefore something goes wrong (just guessing)?
Comment 14 Alexander 2013-07-08 09:43:40 UTC
(In reply to comment #12)
> I tried this from a samba share, but I am unable to duplicate this problem.
> Do you still have this issue with the latest stable version of KDE, v4.10 or
> higher?

I'm using Debian and are still on KDE 4.8.4.
Comment 15 Andrew Crouthamel 2018-09-24 02:24:07 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days, the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please set the bug status as REPORTED so that the KDE team knows that the bug is ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 16 Andrew Crouthamel 2018-10-27 02:26:53 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information.

For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!