How to lose your data permanently in Leopard
November 6th, 2007 by Giles SmithTom Karpik has discovered what appears to be a fundamental error with the directory moving code from Max OS X Leopard. It turns out that when moving files from one medium to another the mechanisms in place to ensure that the transfer occured without error are seriously flawed.
In terms of pseudo code, moving from/to different volumes might look something like this:
move(source, destination) {
returnVal = copy(source, destination);
if(returnVal == TRUE) { // copy success
delete(source);
} else { // copy fail
message("Move failed");
}
}This is where the problem with the Mac OS X 10.5.0 Finder lies.
When you move data from one medium to another, generally you would check that the data was ‘all present and correct’ on the target before removing from the host. Leopard seems to have decided that this is unnecessary, maybe in an attempt to save some time? Now there is no check and if the target medium is removed or the transfer interrupted in any way, you will lose your data permanently from both mediums. This bug has been found as far back as Panther, so it’s been around for a while, and q quick search of google reveals a large number of people suffering from this bug.
This is bad, very bad as I can verify from my own experiences. Data transfers sometimes fail, especially when there is a large amount of small files being transferred. On my Vista/Fedora 7 machine at home all of my files are hosted through samba on a fedora 7 file server in my basement, and sometimes I get errors when moving files between the server and my local, but I am always confident that the data will still be in it’s original location.
If you would like a full graphical walk through of the bug please go here
Want More? Here is something related:
- 29 Oct 2007 -- Mac OS X 10.5 Leopard: the Ars Technica review
- 17 Jun 2008 -- Survey: Programmers shunning Vista for Mac OS and Linux
- 28 Oct 2007 -- I really love (er hate actually) Windows Vista
March 24th, 2008 at 4:15 pm
nice work, brother