How can I prevent Mac apps from deleting a temporary folder that they have created?

0

I'm using an app called DropDMG to extract a large zip file that is 109 GB in size. However once it's extracted the whole bundle, it ends with an error from its subprocess ditto and deletes the temporary folder it created with all the goodies in it.

How can I prevent this? Will simply locking the folder prevent it? DropDMG and ditto are running as the local user and not as root...

Anthony Glyadchenko

Posted 2011-01-25T05:38:20.887

Reputation: 111

Answers

0

Is there any specific reason you're using DropDMG to extract a zipfile versus unzip on the command line or a different GUI tool? I'd recommend checking out The Unarchiver.

I don't think locking the folder would help. If it did prevent access from your application then you wouldn't be able to write the files to it in the first place.

Just Jake

Posted 2011-01-25T05:38:20.887

Reputation: 688

It seems to be the only one that works. unzip and Unarchiver don't work for some reason. I need help because the error will happen soon and I need to prevent deletion this time. – Anthony Glyadchenko – 2011-01-25T05:54:06.350

@Anthony Glyadchenko, you can always try force-quitting the application to prevent it from doing something silly. What do unzip and Unarchiver say when you try the file? Have you attempted repairing the file using zip -F or zip -FF? – Just Jake – 2011-01-25T06:04:54.860

the ditto error is that it couldn't read the pkzip signature... however it extracts just fine... but after the error, the folder gets wiped. :-( – Anthony Glyadchenko – 2011-01-25T06:06:25.480

@Anthony Glyadchenko, what happens when you run unzip /Path/To/Archive? How about zip -F /Path/To/Archive? The second command will attempt to repair damaged zipfiles. It's worked rather well for me in the past with incomplete downloads of zipfiles. I'd give it a try if you can't copy out the contents before ditto torches the files. Speaking of which, you could try starting cp -r /tmp/yourfiles/* /some/other/directory/ now and seeing how much stuff it gets before both operations finish. – Just Jake – 2011-01-25T06:10:21.640