-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression of v8.5.0, still found in v8.5.3 tracking write protection #13742
Comments
Presume if a file has "write protection", it means that a file's "Read-only" attribute is "ON" when examined in Explorer, e.g.: When I try an experiment with this on 8.5.3, I obtain @cs-hv's Expected Behavior, i.e., when I switch the input focus back to N++ after doing @cs-hv 's step 2, the tab bar's icon for the file immediately changes from the "lock" icon to the "checkmark" icon ("alternate icons" in effect), and the file can be edited. |
Yes, exactly. As I'm in Germany, the terminus is "Schreibschutz" (this applies to notepad++ as well as to the explorer) what I translated to "write protection" but has the same meaning/function as "Read-only". The bug only applies to the access of "the very first file every day", a circumstance which makes the bug difficult to reproduce. Even exiting and restarting notepad++ does not make the bug re-occur. Notepad++ seams to miss the attribute change of the file only once a day. However when using notepad++ v8.4.9 (or earlier) the bug does not occur. NB: As I wrote in the initial post, we are using the GhNppExec plugin to access the "SVN lock" command, which in turn removes the read-only attribute from the corresponding file after locking the file. The read-only attribute is removed but notepad++ is not in sync with the file system. |
@cs-hv My Debug Info:
|
Thank you for your efforts.
Something must have been changed from v8.4.9 to v8.5.0 because with v8.5.0 it was the first time we could observe this strange behaviour. |
I cannot reproduce the bug. |
Hi,
OS is Win 10 20H2 if that can help. The reason I'm seeing the bug is that our version control software has all files read-only by default. |
@forcepc |
What's your setting in Preferences -> MISC? |
Hi Yaron10, |
Here you go:
As mentioned earlier, no issues with 8.4.9. |
I checked the setting that @Yaron10 mentioned and mine was set to "Disable". I changed it to "Enable" and now notepad++ seems to correctly detect the read only change... |
Hi @cs-hv,
I have no idea why it won't work properly on your machine.
Great.
I see your point. |
I did tests on a second PC and the probleme is reproducible on it. However I noticed the following: |
We're making some progress. :)
I'd suggest that you test this point a bit more and report again. |
Hi Yaron10, |
Hi @cs-hv, No problem. Enjoy you holiday. |
@Yaron10 @cs-hv When opening via open dialog both flags are applied. So removing from explorer/clear read-only flag cmd will only remove flag from file, but not Notepad++'s flag. Unfortunately I don't have time to do investigation which code does this until next month. |
Can you reproduce @cs-hv's issue? Those two commands might be slightly confusing. |
I like:
|
Your wording is better. 👍
Do you mean a new option to set that attribute? |
Ha. Yeah. I snuck that in. :-) |
Would you like to open a FR for that? |
@donho |
I can reproduce it too. My apologies. |
Removing RO file attribute is convenient for users, but setting file attribute in Notepad++ is pointless (IMO). |
Points:
No problem to me; I have long-ago scripted the behavior, so it is available to me. |
It is good to find the culprit, but unfortunately for me, it was a change I made (and no one else saw anything wrong with it at the time). |
To your eyes only. :) Sometimes amateurs get lucky. It turns out that |
So, really then, my change logically was reasonable, but it exposed a different problem; I saw some question Don asked of mere-human about that (I think), but I can't find where that was now. OK, I can let it go. |
That's correct.
It was in this thread. Don deleted it. |
I've pointed out the PR as culprit, not the dev who has done the PR (and me who is the one to validate it).
It was about the code before your modification. I don't understand why the 2nd argument |
I know you weren't blaming me; but before I fully investigated I was blaming myself. :-) |
We often blame ourselves much more severely than others blame us. :) And now it's my turn. |
Hi @donho Sorry for the late response. I didn't understand at first. Turns out, it was my change about CustomFileDialog that appeared in "git blame". But in reality, it preserved the old behavior added by you (as it was pointed out) Anyway, I'm glad all you guys continue to improve good old Notepad++. Keep up the good work! |
I hope you're doing well. Are Thank you. |
@Yaron10 , As far as I can see, So, you can keep it in case somebody needs it in the future. Or remove at all. |
Thank you. 👍 If and when you have some time: #13790. |
…orer The regression has been made by 5e2f5d7 Fix notepad-plus-plus#13742
Happy to see the issue could be reproduced and fixed. |
Sorry guys for re-activating this old thread but since some versions there is a new regression which can be reproduced with e.g. Notepad++ 8.6.8 (but also some earlier versions). |
Syncronize Paste and Undo commands with file buffer read-only status. Previously, after e.g. removing the read-only flag, file editing was possible immediately, but Ctrl-V was not. At least a cursor movement or switching between the N++ tabs or apps-switching was required (SCN_UPDATEUI message generated...). Fix #13742 (comment), close #15452
Description of the Issue
When a write protected file is opened and the write protection is removed, notepad++ still shows that the file is write protected and editing is not possible. Write protection has to be manually removed using the corresponding menu before the file can be edited and re-written.
Background: We use SVN for managing our source codes an when a file shall be edited, it has to be locked using a context menu from a plugin of notepad++. When the file is locked, the write protection is cleared. Notepad++ fails to track this change correctly.
This happens only for the first file being editing this way.
With v8.4.9 the behaviour is as exptected.
Steps to Reproduce the Issue
Expected Behavior
Write protection removed, file can be edited.
Actual Behavior
Notepad++ still shows the file being write protected, editing not possible.
Debug Information
Notepad++ v8.5.3 (32-bit)
Build time : May 15 2023 - 06:07:16
Path : C:\Program Files (x86)\Notepad++\notepad++.exe
Command Line :
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 22H2
OS Build : 19045.2965
Current ANSI codepage : 1252
Plugins :
GhNppExec ()
mimeTools (2.9)
NppConverter (4.5)
NppExport (0.4)
The text was updated successfully, but these errors were encountered: