|
@@ -40,7 +40,6 @@ func getRemoteFilePath(webdav, user, secert, remote string) {
|
|
|
|
|
|
// 递归遍历目录结构
|
|
|
func readDirRecursive(client *gowebdav.Client, path string) {
|
|
|
- filenum = 0 //重置数量
|
|
|
entries, err := client.ReadDir(path)
|
|
|
if err != nil {
|
|
|
log.Fatal(err)
|
|
@@ -55,10 +54,10 @@ func readDirRecursive(client *gowebdav.Client, path string) {
|
|
|
}
|
|
|
filenum++
|
|
|
file_path := path + "/" + entry.Name()
|
|
|
+ log.Println(file_path)
|
|
|
sp1 := strings.Split(file_path, "/")
|
|
|
sp2 := strings.Split(entry.Name(), ".")
|
|
|
if len(sp2) < 2 || len(sp1) < 3 {
|
|
|
- log.Println(file_path)
|
|
|
db.Update(fmt.Sprintf("%s_err", cf.YusuanInfo),
|
|
|
map[string]interface{}{"file_path": file_path},
|
|
|
map[string]interface{}{
|
|
@@ -70,6 +69,7 @@ func readDirRecursive(client *gowebdav.Client, path string) {
|
|
|
false,
|
|
|
)
|
|
|
} else {
|
|
|
+
|
|
|
db.Update(cf.YusuanInfo,
|
|
|
map[string]interface{}{"file_path": file_path},
|
|
|
map[string]interface{}{
|