0

In windows, upon saving changes to a file that's hidden, sublime text 2 throws the error "Unable to save".

The good commenter below confirms it's only me who's having this problem..

I've tried reinstalling Sublime text, deleting all settings in %AppData%\Sublime Text 2 but still no luck.

Any ideas what might be the issue?

edit: http://sublimetext.userecho.com/topic/104563-error-when-saving-files-with-hidden-attribute-set/

edit: I think I may have found the root cause, it's python 2.6 which sumlime uses to save files https://stackoverflow.com/questions/13215716/ioerror-errno-13-permission-denied-when-trying-to-open-hidden-file-in-w-mod

  • 1
    Your problem isn't that the file's hidden, it's that the file has its read-only flag turned on. – Doktoro Reichard Jul 20 '14 at 20:52
  • @DoktoroReichard Are you confirming that you've tried this and succeeded? Doesn't seem to work for me.. – laggingreflex Jul 21 '14 at 5:34
  • Yes. As the first thing I thought of, I tried it. Hidden files have no special meaning outside of Windows Explorer that's relevant. Can you alter the contents of the file with Notepad or another application? – Doktoro Reichard Jul 21 '14 at 5:48
  • @DoktoroReichard yeah, notepad works just fine. Weird.. – laggingreflex Jul 21 '14 at 6:53
  • @DoktoroReichard Are you sure you're using sublime text 2 on windows? – laggingreflex Sep 4 '14 at 3:47
0

Normally hidden files have no special meaning outside of Windows. However if the file is hidden, Sublime resets the hidden flag (which correlates to the Win32 API call Python does that you mentioned). This in turn makes write access to the file attribute necessary for Sublime to write a file.

When disabling writing attribute privileges on the file's Security Tab and, with the hidden flag, it shows the same error as you. However, it's difficult to say when this would willingly happen.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.