Sublime Forum

Cannot Save Files

#1

I am trying to use Sublime Text to develop a web page that is served by another program. The problem is that I cannot get Sublime Text to save any files that are accessed by that program. I keep getting the error: The process cannot access the file because it is being used by another process.

Closing the server every time I need to edit a file is not an option. Notepad++ has no problems saving the file while the server is running. I have tried turning off the atomic_save option and that didn’t help, it just changed the error message. The only potential solution I’ve found while searching is to disable atomic_save, but that didn’t work.

Is there anyway to get sublime text to ignore file locks? At this point the program is useless without being able to save.

0 Likes

#2

[quote=“acarr”]I am trying to use Sublime Text to develop a web page that is served by another program. The problem is that I cannot get Sublime Text to save any files that are accessed by that program. I keep getting the error: The process cannot access the file because it is being used by another process.

Closing the server every time I need to edit a file is not an option. Notepad++ has no problems saving the file while the server is running. I have tried turning off the atomic_save option and that didn’t help, it just changed the error message. The only potential solution I’ve found while searching is to disable atomic_save, but that didn’t work.

Is there anyway to get sublime text to ignore file locks? At this point the program is useless without being able to save.[/quote]

As you’ve noted, there are many bugs when atomic_save = true (default)

Try turning it off and reboot

0 Likes

#3

Like I said earlier I have tried setting atomic_save = false, that doesn’t fix it. I get a different error though. I have rebooted, doesn’t make a difference.

With atomic save enabled I get the error: “MoveFileEx([myfilepath].subl29.tmp,[myfilepath]\index.html) failed, Access is denied.”

With atomic save disabled I get the error: “The process cannot access the file because it is being used by another process.”

I can edit and save the file with Notepad++ without any problems. I’d like to use sublime text though as it has code completion.

0 Likes

#4

The problem is the deamon serving your page, are you accessing it remotely or is a local file?
What program are you using to access this file if it’s remote? a package like wbond’s sftp or an external ftp client?
What system are you on?
What daemon are you using?
Usually working directly to served files is not a good idea for many reasons, don’t you have the option to keep a local working directory to make the changes and sync the file after being edited?

0 Likes

#5

I’m using National Instruments Labview on Windows 7 to develop a program that has a web user interface. Labview has a web service that serves an html page with some javascript. The web interface displays data that it receives from the Labview program over WebSocket. I need to have the server running to debug the WebSocket interface. Everything is being done locally on my machine.

Even when I stop the web service, Sublime says the file is locked until I exit Labview, which breaks the workflow.

The only thing that seems to think the file is locked is Sublime. I can copy and overwrite the files in explorer without an error, but Sublime won’t save because it says it’s in use.

0 Likes

#6

There’s a lot of Windows issues in ST3 like this, not sure why. Are you sure atomic save if off? autosave off too?

0 Likes