File tree Expand file tree Collapse file tree 1 file changed +26
-9
lines changed
Expand file tree Collapse file tree 1 file changed +26
-9
lines changed Original file line number Diff line number Diff line change @@ -626,16 +626,33 @@ func hasOpen303() bool {
626626 return false
627627 }
628628
629- // Check for the Open303 executable
630- var execName string
631- if runtime .GOOS == "windows" {
632- execName = "Open303.exe"
633- } else {
634- execName = "Open303"
635- }
629+ // Check for Open303.sc file recursively in the Extensions directory
630+ extensionDirs := getSuperColliderExtensionDirs ()
636631
637- execPath := filepath .Join (installDir , execName )
638- return fileExists (execPath )
632+ for _ , dir := range extensionDirs {
633+ // Check direct file path
634+ if fileExists (filepath .Join (dir , "Open303.sc" )) {
635+ return true
636+ }
637+
638+ // Check in subdirectories recursively
639+ found := false
640+ filepath .Walk (dir , func (path string , info os.FileInfo , err error ) error {
641+ if err != nil {
642+ return nil
643+ }
644+ if ! info .IsDir () && info .Name () == "Open303.sc" {
645+ found = true
646+ return filepath .SkipDir
647+ }
648+ return nil
649+ })
650+
651+ if found {
652+ return true
653+ }
654+ }
655+ return false
639656}
640657
641658func getLocalExtensionDir () string {
You can’t perform that action at this time.
0 commit comments