Skip to content

Commit cc46a96

Browse files
authored
Merge pull request #27 from IceWhaleTech/v0.2.1
fixed path error
2 parents 796c25b + 0490904 commit cc46a96

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

route/v1/docker.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -690,8 +690,9 @@ func UnInstallApp(c *gin.Context) {
690690
//step: 删除文件夹
691691
vol := gjson.Get(info.Volumes, "#.host")
692692
for _, v := range vol.Array() {
693-
694-
service.MyService.App().DelAppConfigDir(appId, v.String())
693+
if strings.Contains(v.String(), appId) {
694+
service.MyService.App().DelAppConfigDir(v.String())
695+
}
695696
}
696697

697698
//step: 删除install log

service/app.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"time"
77

88
"github.com/IceWhaleTech/CasaOS/pkg/config"
9-
"github.com/IceWhaleTech/CasaOS/pkg/docker"
109
"github.com/IceWhaleTech/CasaOS/pkg/utils/command"
1110
loger2 "github.com/IceWhaleTech/CasaOS/pkg/utils/loger"
1211
model2 "github.com/IceWhaleTech/CasaOS/service/model"
@@ -26,7 +25,7 @@ type AppService interface {
2625
GetAppDBInfo(id string) model2.AppListDBModel
2726
UpdateApp(m model2.AppListDBModel)
2827
GetSimpleContainerInfo(name string) (types.Container, error)
29-
DelAppConfigDir(id, path string)
28+
DelAppConfigDir(path string)
3029
GetSystemAppList() *[]model2.MyAppList
3130
}
3231

@@ -224,8 +223,8 @@ func (a *appStruct) UpdateApp(m model2.AppListDBModel) {
224223
a.db.Table(model2.CONTAINERTABLENAME).Save(&m)
225224
}
226225

227-
func (a *appStruct) DelAppConfigDir(id, path string) {
228-
command.OnlyExec("source " + config.AppInfo.ProjectPath + "/shell/helper.sh ;DelAppConfigDir " + docker.GetDir(id, path))
226+
func (a *appStruct) DelAppConfigDir(path string) {
227+
command.OnlyExec("source " + config.AppInfo.ProjectPath + "/shell/helper.sh ;DelAppConfigDir " + path)
229228
}
230229

231230
func (a *appStruct) RemoveContainerById(id string) {

types/system.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
package types
22

3-
const CURRENTVERSION = "0.2.0"
4-
const BODY = "<li>add sync function</li><li>fixed some error</li>"
3+
const CURRENTVERSION = "0.2.1"
4+
const BODY = "<li>fixed path error</li>"

0 commit comments

Comments
 (0)