4

A lot of the time, when I open a file in TextEdit, such as test.txt, it will create another file test.txt.sb-d7bff531-E4qLT8 in the same directory.

Why does it do this?

4
  • Do you also get error dialogs about not having permission to open files? Is there anything relevant in system.log / the default view in Console.app?
    – Lri
    Commented Feb 27, 2013 at 6:06
  • Are these files stored on a Mac-formatted drive or on NFS/FAT/SMB/whatever?
    – nohillside
    Commented Feb 27, 2013 at 6:16
  • Have you looked in side the file? I suspect it's the undo buffer. cat test.txt.sb-d7bff531-E4qLT8 from a Terminal to see what's in it.
    – Ian C.
    Commented Feb 27, 2013 at 8:12
  • @LauriRanta Yes, I get that error all the time.
    – Kyle
    Commented Feb 28, 2013 at 4:23

1 Answer 1

1

If you also get errors like this, it's probably the same issue I had.

The document “temp.txt” could not be opened. You don’t have permission.

To view or change permissions, select the item in the Finder and choose File > Get Info.

There were messages like this in system.log, so it could be related to Versions or sandboxing:

9/13/12 10:41:55.118 PM TextEdit[357]: NSFileVersion tried to tried to add a new generation and failed. Versioned file URL: file://localhost/Users/lauri/Notes/temp.txt, contents URL: file://localhost/Users/lauri/Notes/temp.txt.sb-de6477ff-BhVNrq, error: Error Domain=GSLibraryErrorDomain Code=1 "The operation couldn’t be completed. (GSLibraryErrorDomain error 1.)"
9/13/12 10:41:55.118 PM TextEdit[357]: NSDocument failed to preserve the old version of a document. Here's the error:
Error Domain=GSLibraryErrorDomain Code=1 "The operation couldn’t be completed. (GSLibraryErrorDomain error 1.)"
9/13/12 10:41:55.119 PM TextEdit[357]: <Document: 0x7f971d00a510>: An error occurred while attempting to preserve the backup file at file://localhost/Users/lauri/Notes/temp.txt.sb-de6477ff-BhVNrq: Error Domain=GSLibraryErrorDomain Code=1 "The operation couldn’t be completed. (GSLibraryErrorDomain error 1.)"

I ended up replacing TextEdit with TextEditPlus, and I haven't gotten those errors or extra temp files after that. It's based on a version of TextEdit that came with Lion, but it's still mostly identical to the current version.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .