Keep the authorizations when saving a file.

[DEVELOPMENT ENVIRONMENT]
* NEW: Project tree: Add a "refresh project" entry in the filter menu.
* BUG: Keep the authorizations when saving a file.
This commit is contained in:
Benoît Minisini 2023-10-08 23:41:03 +02:00
parent 1fdbb15f1a
commit dc7cf9b3a9
2 changed files with 9 additions and 0 deletions

View file

@ -771,6 +771,11 @@
Text = ("Show all")
Picture = Picture["icon:/small/clear"]
}
{ mnuRefreshProject Menu
Action = "refresh-project"
Text = ("Refresh project")
Picture = Picture["icon:/small/refresh"]
}
{ Menu55 Menu
}
{ mnuUseInheritance Menu

View file

@ -4,6 +4,7 @@ Public NewFile As Boolean
Private $sPath As String
Private $bRename As Boolean
Private $sAuth As String
Public Sub Begin(sPath As String, Optional bKeep As Boolean)
@ -11,6 +12,7 @@ Public Sub Begin(sPath As String, Optional bKeep As Boolean)
$sPath = sPath
NewFile = Not Exist(sPath)
Try $sAuth = Stat(sPath).Auth
Try Kill sPath & "~"
If Not NewFile Then
@ -28,6 +30,8 @@ End
Public Sub End()
Dim sForm As String
If $sAuth Then Chmod $sPath To $sAuth
VersionControl.UpdatePath($sPath)
Try Project.Tree.RefreshKey($sPath)