Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit c1ca132

Browse files
committed
[22308] Ensure Search for Inclusions works if script is unlocked
This patch checks if the script if locked before searching for inclusions, rather than checking if the stack has a password. If the script is locked, then the auto-search cannot be done and a warning is thrown.
1 parent adf7d78 commit c1ca132

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

docs/notes/bugfix-22308.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Ensure "Search for Inclusions" works if the script of a password-protected stack is unlocked

ide-support/revsblibrary.livecodescript

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2848,7 +2848,7 @@ private command revSmartChecking pStackFilesList, @xSettings
28482848
repeat for each line tStack in tStacksList
28492849
if tNewSettings["inclusions"] is "search" then
28502850
# OK-2009-09-07 : Value of password and passkey properties changed, the above test no longer works
2851-
if the password of stack tStack then
2851+
if __ScriptIsLocked(tStack) then
28522852
revStandaloneAddWarning "Could not auto-detect inclusions or security categories because stack is password protected"
28532853
exit revSmartChecking
28542854
end if
@@ -2875,6 +2875,15 @@ private command revSmartChecking pStackFilesList, @xSettings
28752875
unlock messages
28762876
end revSmartChecking
28772877

2878+
private function __ScriptIsLocked pStack
2879+
try
2880+
get the script of stack pStack
2881+
catch tError
2882+
return true
2883+
end try
2884+
return false
2885+
end __ScriptIsLocked
2886+
28782887
private command revCheckObject pObject,pUserLibraries, @xSettings, @xWidgetKinds
28792888

28802889
if word 1 of pObject is "widget" then

0 commit comments

Comments
 (0)