Forráskód Böngészése

fix(framework): existsDir 函数在安卓系统上工作不正常

dzp 2 éve
szülő
commit
9da112e4d3
1 módosított fájl, 13 hozzáadás és 1 törlés
  1. 13 1
      framework/main.tin

+ 13 - 1
framework/main.tin

@@ -113,9 +113,21 @@ PaoTin++ © 2020~2023 的所有版权均由担子炮(dzp <danzipao@gmail.com>) 
 
 #func {existsDir} {
     #local dir {%0};
+
+    #class framework.existsDir.catch open;
+
+    #var existsDir.ok 1;
+    #event {SYSTEM ERROR} {#var existsDir.ok 0};
+
     #local output {};
     #line quiet #scan dir {$dir} output;
-    #if { &output[] > 0 } {
+
+    #class framework.existsDir.catch close;
+
+    #local ok {$existsDir.ok};
+    #class framework.existsDir.catch kill;
+
+    #if { $ok } {
         #return 1;
     };
     #else {