Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Text "Unable to save"

Tags:

I didnt change any file paths and everything was working fine. I made one quick change saved it ok, did another change and I went to save it and got the following error. How can I solve this. It will save other files ok

Unable to save D:\xampp\htdocs\websites\dev.liverpool\style\main.scss Error: MoveFileEx(D:\xampp\htdocs\websites\dev.liverpool\style\.sublae1.tmp, D:\xampp\htdocs\websites\dev.liverpoolzstylezmain.scss) failed,  Access is denied. 
like image 733
Pierce McGeough Avatar asked Aug 16 '13 01:08

Pierce McGeough


People also ask

How do I save my work in Sublime Text?

Save a File with Sublime TextIn Sublime Text's top menu bar, choose File > New File. An untitled, blank file will appear. Next, choose File > Save or Save As.

How do you save a sublime text code on a Mac?

Once you make your document, go to File and click Save (or just press cmd + n ). Write the title of your document. Right under the name there should be a little box that says Macintosh . You can click on it and change it to whatever file you prefer.

Does Sublime Text Auto Save?

Sublime text have a good autosave behavior that saves unsaved files in case of crashes and since it works so good I'm interested in knowing how it works.


2 Answers

seems it's because Windows or another program is blocking the file. Sublime text uses a temporal file instead of editing the file directly, and when you save the file uses a API command to move this edited file to the original, so this command has restrictions when one file is locked and Sublime shows this alert.

Maybe this setting {"atomic_save": false} will work for you.

like image 122
pab_men Avatar answered Sep 20 '22 18:09

pab_men


Go to the path where you installed sublime text 2 and...

  1. Right click on the sublime_text 2.exe file.
  2. Go to its properties.
  3. Go to compatibility section under this.
  4. Set its privilege level to "Run this program as an administrator".
  5. Now change settings for all users and there also check the field "Run this program as an administrator".
  6. Apply the changes.
like image 40
Rishabh Avatar answered Sep 22 '22 18:09

Rishabh