Apple Software On WHS Shares

I run a mixed Windows/Mac home and all my data resides on my Windows Home Server no matter whether it’s Windows or Mac. This means my iPhoto library, iTunes library, Aperture library are all on my Windows Home Server. I recently noticed that these libraries were saving deleted files forever. Here’s why.

Trashes folder on a WHS share

Trashes folder on a WHS shareI run a mixed Windows/Mac home and all my data resides on my Windows Home Server no matter whether it’s Windows or Mac. This means my iPhoto library, iTunes library, Aperture library are all on my Windows Home Server. I recently noticed that these libraries were saving deleted files forever.

The libraries are a directory structure that OS X understands and may present to the user as a single file. For example, iPhoto displays as a single file in OS X unless “show package contents” is selected. Even though my iPhoto library is on a WHS share OS X displays it to me as a single file bundle. As long as the files remain within the library structure all is well. Libraries that maintain their own internal trash bin (i.e. iPhoto and Aperture, maybe more) end up trying to move the files to the OS X trash bin when you empty the library’s trash bin.

I recently noticed that when I emptied the trash in iPhoto that it moved the files to a “.Trashes” folder on my WHS share. (Note the leading dot)  See the first graphic to see what I mean, click it to enlarge) Well actually I noticed this huge .Trashes folder and then found it came from iPhoto and Aperture. If this was an OS X drive running on OS X it would be part of the trash bin and get emptied when I emptied the trash. Aperture also worked the same way once I checked. On the WHS share they live forever,  even OS X didn’t see it as part of the recycle bin.

The .Trashes folder could be deleted just like any other folder without causing a problem. The next time you empty a library’s trash it will be recreated. To see the folder you need to enable viewing hidden files and folder (click for full size for the Windows 7 setting below):

 

Show Hidden Folders Option

I also found that iTunes saved replaced apps to the .Trashes folder. Luckily it doesn’t save replaced or deleted podcasts. If it did I’d probably have run out of disk space. iTunes doesn’t seem to save anything I delete on my own, only the apps it replaced.

It’s only my apps that maintain their own library structure that have this issue. Deleting regular files on my WHS from OS X deletes them immediately.

I guess there is a price to pay for trying to get Microsoft and Apple to play together. But this is a small prices since it’s easily fixed with a scheduled task to delete the directory.