bitcoin/bitcoin — pull request #2099 by gavinandresen (2012-12-12 21:18:25+00:00)
Title: Upgrading to 0.8: re-use blkNNNN.dat files.

This uses boost::filesystem::create_hard_link to hard-link the pre-0.8 blkNNNN.dat files to blocks/blkNNNNN-1.dat

A hard link is the semantics we want: a copy would use twice the disk space, and a move would mean you have to re-download blocks if you switch back to 0.7.

The hard link failing is a soft error-- in that case, you just re-download the blocks.

According to my research, this should work on Windows, unless you're running a FAT32 filesystem.