docwhat / itsalltext

It's All Text! - Edit textareas in your browser with your favorite editor!
GNU General Public License v3.0
197 stars 31 forks source link

editor refuses to update 'readonly' file #63

Closed rretter closed 9 years ago

rretter commented 9 years ago

Using Firefox 35.0.1 and vim7.3 under Windows 7 Pro SvcPk 1.

Bring up editor upon textbox contents by means of either context menu or button. Editor launches with correct text content. However, when saving work is attempted, editor complains:

'readonly' option is set for "blah.domain.com.231x2s1g26.txt". Do you wish to write anyway?

But after confirming intention to write, the writing fails with:

E212: Can't open file for writing

capture

docwhat commented 9 years ago

What is the full path for "Working Directory" (which will be renamed to "Cache Directory" in 1.9.0)?

I'm not super familiar with Windows but if that directory is special in any way, then it might cause this behavior. IAT should create the directory if it doesn't exist already.

What happens if you just set the path to C:\Users\robr\AppData\IAT?

rretter commented 9 years ago

Thank you. The suggestion of "just set the path to C:\Users\robr\AppData\IAT" worked.

Which is, of course, good -- but it doesn't really address the issue of why IAT would have chosen an inappropriate folder location in the first place.

docwhat commented 9 years ago

Well, Windows has lots of "special" directories and Firefox doesn't have an easy way to query the permissions of directories and files... in fact, Windows permissions (ACLs) are really complicated.

What was the directory set to before? I see "Roaming" in the path... Is that a special directory like the old Windows "suitcase" directory? If so, that may be why.

xOneca commented 9 years ago

I suppose it is where Firefox stores profile data by default:

Users\<user>\AppData\Roaming\Mozilla\Firefox\Profiles\<profile>

IAT creates cache folder by default there.

(more info on AppData)

docwhat commented 9 years ago

Huh. It works for me with the default directory last time I checked windows. Weird.