Author Topic: SE does not update write protect state after reload  (Read 1732 times)

stzari

  • Community Member
  • Posts: 33
  • Hero Points: 8
SE does not update write protect state after reload
« on: January 24, 2022, 11:18:14 AM »
Hi,
If an open writable file is changed outside of SE (replaced with an older write protected version) after reload SE does not update
the write protect state. Trying to save the file gives the below error message.
While the message "access denied" is correct, the hints are misleading.

Steps to reproduce:

Have a source file open (writable)
replace the file with an older version that is write protected
Slickedit offers to reload the file - reload (optionally view the diff before reloading)
Note that the file is still displayed as writable
Now make a change in the source file
Try to save
You get a the error message.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6875
  • Hero Points: 530
Re: SE does not update write protect state after reload
« Reply #1 on: January 25, 2022, 05:12:16 PM »
Is the read-only attribute set? Or have there been other advanced permissions changed so the file is read-only.

Also, is this file on a remote file system?

stzari

  • Community Member
  • Posts: 33
  • Hero Points: 8
Re: SE does not update write protect state after reload
« Reply #2 on: January 26, 2022, 01:26:04 PM »
Is the read-only attribute set? Or have there been other advanced permissions changed so the file is read-only.
It's only the read only attribute. No special permissions.

Also, is this file on a remote file system?
This is on a local SSD.

It seems, that this might be related to version control.
Trying the steps in an unrelated directory works correctly, but doing the same in the directory where the sources of the current project reside, gives the error.
The project is using git.

Also a further observation:
Closing SE (even doing a windows restart) and reopening SE still shows the buffer as writable. Only closing the buffer and reopening it will update the state to read only.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6875
  • Hero Points: 530
Re: SE does not update write protect state after reload
« Reply #3 on: January 26, 2022, 01:53:19 PM »
What version control operation did you do and where did you do it (using SlickEdit menu item, at a command prompt, etc.?).

I made changes at a command prompt tweaking the read-only attribute and modifying the file. When I switch back to SlickEdit, SlickEdit immediately changes the RW status to RO before I even re-load the file.
« Last Edit: January 26, 2022, 02:38:38 PM by Clark »

stzari

  • Community Member
  • Posts: 33
  • Hero Points: 8
Re: SE does not update write protect state after reload
« Reply #4 on: January 26, 2022, 03:18:33 PM »
Strange.
I can't reproduce the error anymore.

I'll try to find a reproducible case again. Sorry for the noise.

What version control operation did you do and where did you do it (using SlickEdit menu item, at a command prompt, etc.?).
I just copied an older version of the file from another directory into the project directory.