Toby Chui 1 سال پیش
والد
کامیت
4e02be2b8c
2فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 1 1
      file_system.go
  2. 1 1
      mod/filesystem/static.go

+ 1 - 1
file_system.go

@@ -2468,7 +2468,7 @@ func system_fs_getFileProperties(w http.ResponseWriter, r *http.Request) {
 					usefallback = false
 					filesize = nativeSize
 				} else {
-					fmt.Println(nativeSize)
+					fmt.Println(err.Error())
 				}
 			}
 

+ 1 - 1
mod/filesystem/static.go

@@ -288,7 +288,7 @@ func GetDirectorySizeNative(filename string) (int64, error) {
 	//use native syscall to get disk size
 	cmd := exec.Command("du", "-sb", abspath)
 	out, err := cmd.CombinedOutput()
-	if err == nil {
+	if err != nil {
 		return 0, err
 	}