Skip to Content

TextEdit data loss concerns

Over at MacOSXHints, Rob G. has posted a must-read article about possible data loss from TextEdit's Save dialog. The problem stems from TextEdit's (and Cocoa's) willingness to overwrite entire folders with text files.

This data security hole seems to occur because "bundle" style files (which are actually folders and not single files) are considered on-par with flat files in OS X. TextEdit does not seem to check to ensure that the folder being replaced is actually a bundle and not, say, your entire home directory. It's an important article to read and a bug that you need to be aware of.



Categories

Bugs/Recalls

Over at MacOSXHints, Rob G. has posted a must-read article about possible data loss from TextEdit's Save dialog. The problem stems from...
 

Add a Comment

*0 / 3000 Character Maximum

3 Comments

Filter by:
Daryn Sharp

The first poster is wrong. File and folders are not equal in UNIX/linux. There are different system calls and semantics for each. Directories cannot be accidently removed when the expected destination is a file. The open call will fail with EISDIR (Is a directory). This is a GUI problem.

Note that Cocoa save dialogs will present a warning panel that says:

-----
"directory" already exists. Do you want to replace it?

A file or folder with the same name already exists in daryn. Replacing it will overwrite its current contents.

Cancel Replace
-----
The user is given fair warning, but most users will never even accidently see this panel. Consider how many files are saved with no extension. Very few. This is a contrived example of a non-problem.

December 20 2006 at 11:46 PM Report abuse rate up rate down Reply
Fritz Laurel

Not so much "data security" as it is "data integrity."

December 20 2006 at 5:43 PM Report abuse rate up rate down Reply
Leroy

actually all UNIXes work like that, files and folders are equal, same thing with linux. it's not a flaw, it's like that by design. i remember this one time when i tried to copy paste a C header file to another directory and i just slapped it in a directory with the rest of the header files. or so i thought, turned out i had overwritten the folder, lol.

December 20 2006 at 1:59 PM Report abuse rate up rate down Reply
Buy an ad here

Hot Apps on TUAW

Tweets

© 2012 AOL Inc. All Rights Reserved.