Previous 1 2 Next 18 Replies Latest reply: Jul 26, 2011 3:39 PM by AlMacE
unspokenblabber Level 1 Level 1 (0 points)
Hello,

This is an annoying feature added to XCode-4.

Today I was working on a project and needed to add some existing files. But I accidentally added the entire folder. On deleting the folder from XCode-4 it got deleted from the machine. completely. The files are not even found in Trash. This is stupid and Apple needs to fix this. I remember deleting a file/folder from XCode 3.3 would still keep the file in at least Trash.

Any help is appreciated. Any free softwares to recover the files ? Thank you.

Desperate.

iMac, Mac OS X (10.6.6)
  • xnav Level 5 Level 5 (6,635 points)
    Was the folder backed up in Time Machine?
  • unspokenblabber Level 1 Level 1 (0 points)
    NO. All this happened in a span of 5 minutes. So no back up.
  • etresoft Level 7 Level 7 (26,395 points)
    Xcode4 still asks if you want to delete the files themselves or just the references. The default response is "just the references".
  • unspokenblabber Level 1 Level 1 (0 points)
    Yes it does. But in XCode 3 when you choose 'Delete' instead of 'Remove references' it would delete the file/folder only from the Project Folder and not the machine entirely. And sometimes it is useful eg.: when you want to replace the said file with another file with the same name, more particularly lets say if you want to change the Default.png file you would delete it rather than just removing its references.

    I seriously feel there should be at least a warning or something that says this your last chance to say goodbye to this file. Sayonara !!
  • etresoft Level 7 Level 7 (26,395 points)
    I see what you mean now. Xcode3 explicitly says "Move to the trash" whereas Xcode4 just says "delete". It seems like a change Apple meant to do. All you can do is submit an enhancement request and ask them to change it back.
  • K T Level 7 Level 7 (23,700 points)
    W/Xcode 4, I see a dialog that says cancel; remove; remove reference only; delete. Right above that is says "The operation cannot be undone. Unsaved changes will be lost".

    The 'are you sure' effort is therefore in place.

    If you want 'are you sure you're sure?' style of dumbed down Window's dialogs, you're not going to get it w/these tools...that hasn't changed. Don't blame the tools.
  • unspokenblabber Level 1 Level 1 (0 points)
    Oh well.. lets see you loose your files and then not blame this change. There are three buttons that say 'Cancel', 'Remove Reference Only' and 'Delete'. How long have you been using XCode and if you have been using it longer than a year then you must've been used to deleting if you wanted to delete as opposed to just removing reference. Read my earlier comments. This was a subtle change with major consequences.
  • D7 Level 2 Level 2 (290 points)
    You poor soul. You did exactly what I did an hour ago. The files were nowhere to be found on my filesystem as I verified with the mdfind command. I did find my files in time machine and by luck they were within a few compilation errors of completion.

    Goodness yes this needs to get fixed! A lot of the code I write is straight forward but these changes were a result of a significant refactoring I had nearly completed.
  • joshnapkins Level 1 Level 1 (0 points)
    This really needs to be fixed. I got bit by this today as well..

    I created a default Audio Unit, then added a second target to my project with another Audio Unit. When I decided to delete the second target I said yes to deleting the files, read the warning about not being able to undo this and clicked okay because I really didn't want any of the files anymore. Then Xcode deletes all the included AudioUnit system files from my computer (AUBase.h, etc...) because they were linked in a folder within the project!! Now I have to re-download and reinstall XCode4 to get the files back. Sheesh.
  • frangipane Level 1 Level 1 (0 points)
    And that's the future?
  • K T Level 7 Level 7 (23,700 points)
    +>Oh well.. lets see you loose your files and then not blame this change.+

    I take my work seriously - I have backups. It's a poor man that blames his tools. Don't shirk your responsibilities by fearing and blaming change.
  • etresoft Level 7 Level 7 (26,395 points)
    D7 wrote:
    You poor soul. You did exactly what I did an hour ago. The files were nowhere to be found on my filesystem as I verified with the mdfind command. I did find my files in time machine and by luck they were within a few compilation errors of completion.


    Time Machine was not designed for source control. Xcode supports both git and subversion.

    Goodness yes this needs to get fixed! A lot of the code I write is straight forward but these changes were a result of a significant refactoring I had nearly completed.


    Doesn't refactoring save a snapshot of your project by default?
  • etresoft Level 7 Level 7 (26,395 points)
    joshnapkins wrote:
    This really needs to be fixed.


    It isn't going to be fixed.

    Xcode deletes all the included AudioUnit system files from my computer (AUBase.h, etc...) because they were linked in a folder within the project!!


    They were what? Leave system files where they belong. Don't put them in your project.
  • D7 Level 2 Level 2 (290 points)
    Of course time machine is not designed for source control. It does, however, provide a near hourly backup that helped solve my immediate problem. I am using git and perhaps if my experience with git wasn't so low I would have been able to recover the files. During and after the loss I've spent a good deal of time learning git at the command line.

    Refactoring may save a snapshot but I believe it does so when you start--I was well into the changes by then.
Previous 1 2 Next