What's causing the pictures copied to my HTC Desire to disappear? I'm currently running CyanogenMod 7.0.3 on my HTC Desire, and pictures copied to the SD card disappear!

If I copy an image from my computer to the phone using USB Mass Storage mode, it disappears as soon as the copy is finished.

Pictures taken with the Camera app disappear too.

Pictures copied with adb push some_pic.jpg /mnt/sdcard/DCIM/100MEDIA don't show up in the Gallery app.
I noticed a similar problem on my HTC G2 recently after I migrated phones.  Deleting the thumbnails folder fixed the problem.

See also: Not all images showing up in gallery