Uncaught Error: EPERM: operation not permitted, open 'C:\Users\jysperm\Git\jysperm\RootPanel\.gitignore'
Closed this issue · 6 comments
- Edit
.gitignore
in my project. - Use
ctrl-S
to save the file, then it throw this error.
Restart Atom can't solve the problem. The same problem also appear in another project.
Only .gitignore
will throw error, other dot files(.npmignore
) are not.
Atom Version: 0.201.0
System: Windows 10
Thrown From: autosave package, v0.20.0
Stack Trace
Uncaught Error: EPERM: operation not permitted, open 'C:\Users\jysperm\Git\jysperm\RootPanel.gitignore'
At C:\Users\jysperm\AppData\Local\atom\app-0.201.0\resources\app.asar\node_modules\pathwatcher\lib\file.js:376
Error: EPERM: operation not permitted, open 'C:\Users\jysperm\Git\jysperm\RootPanel\.gitignore'
at Error (native)
at Object.fs.openSync (fs.js:544:18)
at Object.module.(anonymous function) [as openSync] (ATOM_SHELL_ASAR.js:118:20)
at Object.fs.writeFileSync (fs.js:1155:15)
at Object.fsPlus.writeFileSync (C:\Users\jysperm\AppData\Local\atom\app-0.201.0\resources\app.asar\node_modules\fs-plus\lib\fs-plus.js:279:17)
at File.module.exports.File.writeFileSync (C:\Users\jysperm\AppData\Local\atom\app-0.201.0\resources\app.asar\node_modules\pathwatcher\lib\file.js:264:19)
at File.module.exports.File.writeFileWithPrivilegeEscalationSync (C:\Users\jysperm\AppData\Local\atom\app-0.201.0\resources\app.asar\node_modules\pathwatcher\lib\file.js:362:21)
at File.module.exports.File.writeSync (C:\Users\jysperm\AppData\Local\atom\app-0.201.0\resources\app.asar\node_modules\pathwatcher\lib\file.js:336:12)
at TextBuffer.module.exports.TextBuffer.saveAs (C:\Users\jysperm\AppData\Local\atom\app-0.201.0\resources\app.asar\node_modules\text-buffer\lib\text-buffer.js:981:17)
at TextBuffer.module.exports.TextBuffer.save (C:\Users\jysperm\AppData\Local\atom\app-0.201.0\resources\app.asar\node_modules\text-buffer\lib\text-buffer.js:967:19)
at TextEditor.module.exports.TextEditor.save (C:\Users\jysperm\AppData\Local\atom\app-0.201.0\resources\app.asar\src\text-editor.js:567:26)
at Object.module.exports.autosavePaneItem (C:\Users\jysperm\AppData\Local\atom\app-0.201.0\resources\app.asar\node_modules\autosave\lib\autosave.js:56:80)
at C:\Users\jysperm\AppData\Local\atom\app-0.201.0\resources\app.asar\node_modules\autosave\lib\autosave.js:27:26
Commands
-0:06.0 core:paste (atom-text-editor.editor.is-focused)
-0:04.2.0 core:save (atom-text-editor.editor.is-focused)
Config
{
"core": {
"projectHome": "C:\\Users\\jysperm\\Git",
"disabledPackages": [
"react"
]
},
"autosave": {
"enabled": true
}
}
Installed Packages
# User
atom-beautify, v0.27.6
atom-ternjs, v0.6.2
file-icons, v1.5.5
git-projects, v1.14.1
language-jade, v0.4.0
linter, v0.12.6
linter-coffeelint, v0.2.4
remote-sync, v3.1.1
wakatime, v4.0.9
# Dev
No dev packages
Having the same issue on a file that is specifically read-only, and I would like to preserve the read-only attribute of the file without auto-save blowing up.
Tested on Windows 7, with atom 0.209.0, autosave 0.20.0.
The other text editors override the write protection. Atom doesn't give us the ability to override the write protection.
Sublime Text gives this option when trying to write into the file:
Visual Studio Code (the text editor, not the IDE) gives this option when trying to write into the file:
I can reproduce this error many times. When I run Visual Studio IDE to run a server, it locks all the files on the project.
Just the same as @maaarghk said. I am on v1.0.5 and Windows 10
Any news on this ? We are using SourceGear Vault that locks all files by default, normally if you want to modify a file, you have to check out it and then modified it, but with other text editors we could simply save and it will ask if we want to overwrite
bump. Would like to know if there's an override?