John Beynon

Confessions of a code Junkie and anything else i fancy!

My first OSX disappointment

So I’ve just experienced my first disappointment with OSX and I’m sorry but it’s backwards when it comes to copy operations.

Let me explain. I checked out the latest codebase for a site from git, I then aquired the latest code patch – the particular site runs MediaWiki and I extracted the zip and copied the contents and pasted it over the top of my checked out code (choosing replace from the dialog) only then to find that my folders that had code in them no longer had code in them. My checked out code had a folder called extensions in which had a number of subfolders/files in, whilst the patch has a vanilla extensions folder with simply a readme file in so after the operation I’m left with an extensions folder with just the readme file in whereas what I was actually expecting was the readme file to appear in the extensions folder along with the existing files.

Some digging reveals this is expected behaviour and suggests that I third party tool is used – how can this be? How to folk apply patches to code, sorry but it’s backwards!

No related posts.

Tagged as:

4 Comments

  1. Heh, man that is backwards. It just doesn’t seem right?…

    The other one that always left me dumbstruck was if you deleted (aka moved to trash) a file in one folder called “index.cfm” and then deleted a file in a completely different folder called “index.cfm”, you would end up with two files in the trash called something like: “index.cfm” and “index (1).cfm”. What the hell? Then you couldn’t just “restore” the files to their original folders like you could in Windows (for at least 12 years prior), you had to manually drag them back to where you thought they lived, and rename one of them as well.

    Imagine if you accidentally did that with a whole nested directory (hey, it’s easy to accidentally drag and drop an adjacent folder with a similar name onto the trash, right?) and wanted to get it back out of the trash, only to find you had to manually drag and drop dozens of files and rename a bunch of them after you worked out which ones belonged in which folders… Well it happened to me once :P Fun!

    (P.S I think this is was finally fixed in 10.5?)

  2. I’ve been caught by that too. I spent a bunch of time working on something on the Mac and then copied some other files from a USB key only to find that the the work I’d done was gone because the folder it was in was overwritten and all files and sub-folders removed and replaced by new ones. Not new ones with the same names, just different ones. It is the stupidest default behavior ever.

  3. @John: Well, to be completely fair to OSX, it did ask if you are SURE you want to REPLACE all the contents of the directory. Operating systems are not really expected to be file synchronization systems, are they? I have always had to use third party tools for this task, even on Windows. But I do understand that it is different behavior than you are used to under Windows.

    @Justin: Back in Mac OS 7 thru 9, you could simply select files or directories in the Trash, and select “Put Away” from the File menu. It would return everything, with the original names in tact, to their last locations before they were put in the Trash. You can even do this with items that are moved to the Desktop. But sadly, they did not implement this in OSX. If you happen to catch your “mistake” before doing any other copy or move operations in the Finder, however, you can use the “Undo Move/Copy” command from the Edit menu to put everything back to where it was originally.

  4. Are you sure it’s backwards, or just not what you’re used to. So windows merges the files on a copy. What if the permissions on one folder are different than the other. Which folders permissions should be used? Should those be merged also? Windows just assumes this stuff which can be dangerous at times.

    To me, the way it works is just different…just like a whole slew of things in OSX :)

Leave a Response