File tree 3 files changed +8
-8
lines changed
3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -690,8 +690,9 @@ func UnInstallApp(c *gin.Context) {
690
690
//step: 删除文件夹
691
691
vol := gjson .Get (info .Volumes , "#.host" )
692
692
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
+ }
695
696
}
696
697
697
698
//step: 删除install log
Original file line number Diff line number Diff line change 6
6
"time"
7
7
8
8
"github.com/IceWhaleTech/CasaOS/pkg/config"
9
- "github.com/IceWhaleTech/CasaOS/pkg/docker"
10
9
"github.com/IceWhaleTech/CasaOS/pkg/utils/command"
11
10
loger2 "github.com/IceWhaleTech/CasaOS/pkg/utils/loger"
12
11
model2 "github.com/IceWhaleTech/CasaOS/service/model"
@@ -26,7 +25,7 @@ type AppService interface {
26
25
GetAppDBInfo (id string ) model2.AppListDBModel
27
26
UpdateApp (m model2.AppListDBModel )
28
27
GetSimpleContainerInfo (name string ) (types.Container , error )
29
- DelAppConfigDir (id , path string )
28
+ DelAppConfigDir (path string )
30
29
GetSystemAppList () * []model2.MyAppList
31
30
}
32
31
@@ -224,8 +223,8 @@ func (a *appStruct) UpdateApp(m model2.AppListDBModel) {
224
223
a .db .Table (model2 .CONTAINERTABLENAME ).Save (& m )
225
224
}
226
225
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 )
229
228
}
230
229
231
230
func (a * appStruct ) RemoveContainerById (id string ) {
Original file line number Diff line number Diff line change 1
1
package types
2
2
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>"
You can’t perform that action at this time.
0 commit comments