Skip to content

CasaOS - A simple, easy-to-use, elegant open-source Personal Cloud system.

Optimize installation process

link39ccbe251faa
diff --git a/UI b/UI
index 0a78d55..645e6ca 160000
--- a/UI
+++ b/UI
@@ -1 +1 @@
-Subproject commit 0a78d55a82dbeb10e617189358f8747629045377
+Subproject commit 645e6cac7dcc188d310b7fa7add3d03688021d23
diff --git a/service/docker.go b/service/docker.go
index 25b2e74..5055338 100644
--- a/service/docker.go
+++ b/service/docker.go
@@ -7,6 +7,7 @@ import (
"encoding/binary"
json2 "encoding/json"
"fmt"
+ "regexp"
"syscall"
model2 "github.com/IceWhaleTech/CasaOS/service/model"
@@ -417,9 +418,10 @@ func (ds *dockerService) DockerContainerCreate(imageName string, containerDbId s
if len(path) == 0 {
continue
}
-
}
- if strings.HasSuffix(path, "/") {
+ reg1 := regexp.MustCompile(`([^<>/\\\|:""\*\?]+\.\w+$)`)
+ result1 := reg1.FindAllStringSubmatch(path, -1)
+ if len(result1) == 0 {
err = file.IsNotExistMkDir(path)
if err != nil {
ds.log.Error("mkdir error", err)
diff --git a/service/zima_info.go b/service/zima_info.go
index 86f6000..4770ff8 100644
--- a/service/zima_info.go
+++ b/service/zima_info.go
@@ -84,14 +84,9 @@ func (c *zima) GetDirPath(path string) []model.Path {
ls, _ := ioutil.ReadDir(path)
dirs := []model.Path{}
- if strings.Count(path, "/") > 1 {
+ if strings.Count(path, "/") > 0 {
for _, l := range ls {
- pathTemp := path + l.Name()
- if l.IsDir() {
- pathTemp += "/"
- }
-
- dirs = append(dirs, model.Path{Name: l.Name(), Path: pathTemp, IsDir: l.IsDir()})
+ dirs = append(dirs, model.Path{Name: l.Name(), Path: path + "/" + l.Name(), IsDir: l.IsDir()})
}
} else {
dirs = append(dirs, model.Path{Name: "DATA", Path: "/DATA/", IsDir: true})
diff --git a/types/system.go b/types/system.go
index 4793dc3..7c533c9 100644
--- a/types/system.go
+++ b/types/system.go
@@ -1,4 +1,4 @@
package types
const CURRENTVERSION = "0.1.6"
-const BODY = "<li>Add a file selector for app install.</li> <li>Fixed an issue with the app were it would disappear when the app was modified.</li>"
+const BODY = "<li>Modify import reminder.</li><li>Add app icon auto-fill via docker image name.</li><li>Add a file selector for app install.</li> <li>Fixed an issue with the app were it would disappear when the app was modified.</li>"