Jump to content
CoMPi74

Auto Readonly mode for files on search path

Recommended Posts

Hi there,


I am looking for the IDE's (or a third party add-on's) option which auto sets the editor in a readonly mode when opening a file from search path. I remember that years ago I was using such an option but now I can not find it again. Any ideas?

 

Piotr

Share this post


Link to post
18 hours ago, CoMPi74 said:

Hi there,


I am looking for the IDE's (or a third party add-on's) option which auto sets the editor in a readonly mode when opening a file from search path. I remember that years ago I was using such an option but now I can not find it again. Any ideas?

 

Piotr

In my opinion source files you want to protect from modification should be located in a folder tree the user you are working with does not have write access to. Don't use an admin account to work in the IDE!

Share this post


Link to post
39 minutes ago, PeterBelow said:

In my opinion source files you want to protect from modification should be located in a folder tree the user you are working with does not have write access to. Don't use an admin account to work in the IDE!

He is not just talking about RTL or VCL files but about files in the search path, which as I read it includes the project search path e.g. possibly ..\libs\some\library\source

Putting these into read-only folders is not feasible.

Edited by dummzeuch

Share this post


Link to post
8 hours ago, Ondrej Kelle said:

A long time ago I wrote one for files in the $(DELPHI)\Source directory:

Thank you for the example, I think this will keep me busy on my next plane ride.

Almost everything on the browse, library and search path could be read only for me.

Share this post


Link to post

Actually, I was talking about all files on path defined in Options (Delphi Options -> Library -> Directories -> Library / Browsing path). My fault, I should explain it better. Sorry.
My problem is that using Ctrl+LMB I often get to a source code I don't want to modify (like VirtualTrees.pas) what, unfortunatelly, happens to me very often. So is there a way to have those files 'protected' against accidental, unintentional modifications?

 

Share this post


Link to post

The plug-in, that @Ondrej Kelle mentioned looks promising. You'd need to adjust the path which it checks for, but it shouldn't be too difficult.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×