From e9bc65686cd5814a171f5fce1c842aa127434f69 Mon Sep 17 00:00:00 2001 From: gambas Date: Wed, 16 May 2018 19:00:22 +0200 Subject: [PATCH] Software farm: Don't crash when installing an example if its symbolic link alread exists. [DEVELOPMENT ENVIRONMENT] * BUG: Software farm: Don't crash when installing an example if its symbolic link alread exists. * BUG: Project tree: CTRL + double-click is now triggered only on source files. --- app/src/gambas3/.src/FMain.class | 6 ++++-- app/src/gambas3/.src/Project/Farm/CSoftware.class | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/gambas3/.src/FMain.class b/app/src/gambas3/.src/FMain.class index 722af9b16..a9c25665b 100644 --- a/app/src/gambas3/.src/FMain.class +++ b/app/src/gambas3/.src/FMain.class @@ -146,6 +146,7 @@ Public Sub tvwProject_Activate() Dim sMime As String Dim hProgList As DesktopFile[] Dim hProcess As Process + Dim sKeyClass As String sKey = tvwProject.Key @@ -153,8 +154,9 @@ Public Sub tvwProject_Activate() tvwProject[sKey].Expanded = True If CanEdit(sKey) Then If $bCtrl Then - If File.Ext(sKey) <> "module" Then - sKey = File.SetExt(sKey, "class") + If Project.IsSourcePath(sKey) And If File.Ext(sKey) <> "module" Then + sKeyClass = File.SetExt(sKey, "class") + If Project.IsSourcePath(sKeyClass) Then sKey = sKeyClass Endif Endif Project.OpenFile(sKey,,, True) diff --git a/app/src/gambas3/.src/Project/Farm/CSoftware.class b/app/src/gambas3/.src/Project/Farm/CSoftware.class index abc0493c9..2e1840bae 100644 --- a/app/src/gambas3/.src/Project/Farm/CSoftware.class +++ b/app/src/gambas3/.src/Project/Farm/CSoftware.class @@ -442,6 +442,7 @@ Public Sub Install(Optional bJustDownload As Boolean) As String If LCase(Vendor) <> "example" And If Tags.Exist("example", gb.IgnoreCase) Then Try Mkdir File.SetName(sSrcDir, "example") + Try Kill File.SetName(sSrcDir, "example") &/ sName Link ".." &/ File.Name(sSrcDir) &/ sName To File.SetName(sSrcDir, "example") &/ sName Endif