|
@@ -39,7 +39,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)
|
|
@@ -54,6 +53,7 @@ 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 {
|
|
@@ -69,6 +69,10 @@ func readDirRecursive(client *gowebdav.Client, path string) {
|
|
|
false,
|
|
|
)
|
|
|
} else {
|
|
|
+ if file_path == "2022年/陕西省/商洛市/政府/2022_残疾人联合会_1.pdf" {
|
|
|
+ log.Println("sssssssssssssssssss")
|
|
|
+ }
|
|
|
+
|
|
|
db.Update("fileitem",
|
|
|
map[string]interface{}{"file_path": file_path},
|
|
|
map[string]interface{}{
|