notepad-plus-plus
notepad-plus-plus copied to clipboard
Failed to save file - Not enough space on disk to save file
Saving any file to a G:/ location (Google Drive) gives me an error in Notepad++ since the latest version. Windows Notepad does save properly in the same location.
Description of the Issue
"Failed to save file. It seems there's not enough space on disk to save file."
Steps to Reproduce the Issue
- Install Google Drive App on Windows
- Right click a folder inside G:/... to create a file
- Save
Expected Behavior
I expect the file to save.
Actual Behavior
File doesn't save.
Debug Information
Notepad++ v8.4.2 (32-bit) Build time : May 29 2022 - 16:45:17 Path : C:\Program Files (x86)\Notepad++\notepad++.exe Command Line : $COMMAND_LINE_PLACEHOLDER$ Admin mode : OFF Local Conf mode : OFF Cloud Config : OFF OS Name : Windows 11 (64-bit) OS Version : 21H2 OS Build : 22000.739 Current ANSI codepage : 1252 Plugins : ComparePlugin (2.0.1) mimeTools (2.8) NppConverter (4.4) NppExport (0.4) NppMarkdownPanel (0.5) NppXmlTreeviewPlugin (2) XMLTools (3.1.1.1)
I've just updated to latest, and I don't have Google Drive App running, yet also having these problems. About 25% of files I have open are showing this issue.
Notepad++ v8.4.2 (64-bit) Build time : May 29 2022 - 16:47:30 Path : C:\Program Files\Notepad++\notepad++.exe Command Line : $COMMAND_LINE_PLACEHOLDER$ Admin mode : OFF Local Conf mode : OFF Cloud Config : OFF OS Name : Windows 10 Home (64-bit) OS Version : 21H1 OS Build : 19043.1766 Current ANSI codepage : 1252 Plugins : mimeTools (2.8) NppConverter (4.4) NppExport (0.4)
UPDATE: I believe my issue was MS's File Protection and Blocked Folder Access. Although no indications or warning of the blockage(s) were happening until this morning when one notified me. So, this one seems to be on a crappy implementation of Win Security and not NP++. Thanks.
What was your last working Notepad++ version?
Could you please do the same but with a Notepad++ main executable replacement?
- download and unpack somewhere the original 8.4.2 x64 portable version
- replace the notepad++.exe file there with the version from this 7-Zip archive
- run this N++ and test the failed saving as before
- after a fail check the N++ main folder (where the notepad++.exe file is) for the presence of a possible error log-file (npplogWriteFileFailedX.log), if there will be some, please paste its content here
UPDATE: I believe my issue was MS's File Protection and Blocked Folder Access. Although no indications or warning of the blockage(s) were happening until this morning when one notified me. So, this one seems to be on a crappy implementation of Win Security and not NP++. Thanks.
Just happened to me and that fixed it. No popup from Windows but it was on my notifications tab. The same thing happened to me about a week ago with a Microsoft Visual Studio operation.
I think I'll now have to remember to check when something similar happens in other software. This has only started happening recently, so it could be a recent Windows Update at fault.
Hi, Same here with 8.4.5, no google drive app involved. Juste 500Mo file -> modify -> save as -> error message -> file 0 octet
@M5rcury have you found a way around this issue? Running as admin doesn't work for me. After disabling Windows focus assist and enabling notifications, I do not see a notification.
@xomx on v8.4.5 now, the issue still persists, also when replacing the .exe with one from the v8.4.5 portable version. No error logs, unsure what the last working version was (v8.4.1 most likely).
@bnbaz
on v8.4.5 now, the issue still persists, also when replacing the .exe with one from the v8.4.5 portable version
??? The "notepad++.exe" file included in a N++ installer and its corresponding portable archive is the same.
Or do you mean replacing it by my special patched 8.4.2 version (see above) with enhanced logging capability?
No error logs,
So you tried my special version and got no such "npplogWriteFileFailedX.log" files, right?
M5rcury have you found a way around this issue?
Actually he seems to have found the culprit ("UPDATE: I believe my issue was MS's File Protection and Blocked Folder Access...").
This is also what I think for now about these kind of issues - it is probably caused by an antivirus/firewall.
@xomx sorry, misunderstood your comment. Used the patched version, npplogWriteFileFailed2.log was created:
2022-09-29 15:00:22 G:\My Drive\bnbaz\file.txt WriteFile WINAPI failed with ErrorCode: 5 - Access is denied.
Location is G:\ is Google Drive's virtual drive mounted as G:\
M5rcury's solution doesn't seem to apply: there is no trace of MS File Protection blocking the file in my notifications. I'm not using third party antivirus/firewall, just default Windows 11 Virus & Threat protection.
@bnbaz
2022-09-29 15:00:22 G:\My Drive\bnbaz\file.txt WriteFile WINAPI failed with ErrorCode: 5 - Access is denied.
So your "Failed to save file. It seems there's not enough space on disk to save file." N++ message reported is misleading here. The real reason is that somebody/something has denied the filedata writing for N++ to that destination.
This log-result is really weird, it means that:
- the previous file-output opening call in N++ succeeded (CreateFile WINAPI with access parameter for both
GENERIC_READ
andGENERIC_WRITE
) - but then the real data writing with the WriteFile WINAPI is not allowed!?
I can think of the only way how to achieve this:
- the N++ app successfully opens the desired file-output for the writing
- but then an external app (AV/firewall/shell extension/system hook...) does not permit the file writing via the WriteFile WINAPI
Definitely an outside SW/condition that interferes with N++.
I'm not using third party antivirus/firewall, just default Windows 11 Virus & Threat protection.
So I bet that this is the culprit here. Maybe you can try to temporarily disable its real-time protection and repeat the saving:
Because of you are able to write to that destination with common Windows Notepad app, I do not think that this issue is about insufficient user rights. But for surety - you can try the same but with running the N++ as an admin (rightclick -> Run as administrator).
Yes, that's it, in combination with storing the file on G:\
So: Real-time protection OFF + C:\ -> works Real-time protection ON + C:\ -> works Real-time protection OFF + G:\ -> works Real-time protection ON + G:\ -> fail
Doesn't matter whether I run nppp with admin privileges.
Now you can try to add an exclusion (Settings -> Update & Security -> Windows Security -> Virus & threat protection -> Manage settings -> Add or remove exclusions -> + Add an exclusion ...) and switch the real-time protection back ON.
But there is also a possibility that it is a Microsoft or Google bug (it does not make any sense to me to allow "a potential threat" to write to C: but forbid writing to your G: ...). Could you also install & test some other similar solution (e.g. DropBox)?
In my case, because I have Controlled Folder Access turned on under Virus & threat protection in Windows Security for D: drive where my edited file is, making Notepad++ in the allowed list of apps did the trick for me. Try checking it.
In my case, because I have Controlled Folder Access turned on under Virus & threat protection in Windows Security for D: drive where my edited file is, making Notepad++ in the allowed list of apps did the trick for me. Try checking it.
![]()
![]()
man thanks, adding notepad++.exe in the allowed list saved me.
In my case, because I have Controlled Folder Access turned on under Virus & threat protection in Windows Security for D: drive where my edited file is, making Notepad++ in the allowed list of apps did the trick for me. Try checking it.
![]()
![]()
man thanks, adding notepad++.exe in the allowed list saved me.
Oh my, so glad that it helped! Errors sometimes complicate things. Glad I remembered I had my folders restricted lol
@bnbaz This issue is resolved, it has nothing to do with Notepad++, the culprit is improper Windows Security settings. I recommend CLOSING of this issue.
Thank you @xomx for solving people's problem and identifying the cause. This issue is closed.