Przeglądaj źródła

1.修改离线Sales Order在拷贝时错误。

Pen Li 8 lat temu
rodzic
commit
87d6c6a1ef

BIN
RedAnt ERP Mobile/RedAnt ERP Mobile.xcworkspace/xcuserdata/macmini1.xcuserdatad/UserInterfaceState.xcuserstate


+ 3 - 0
RedAnt ERP Mobile/common/Functions/PDF+Web/PDFViewController.m

@@ -197,6 +197,9 @@
     NSString *path = NSTemporaryDirectory();
     NSString *filePath = [path stringByAppendingPathComponent:self.filename];
     NSFileManager *fileManager = [NSFileManager defaultManager];
+    if ([fileManager fileExistsAtPath:filePath]) { // 文件存在就不会拷贝
+        [fileManager removeItemAtPath:filePath error:nil];
+    }
     [fileManager copyItemAtPath:localPath toPath:filePath error:nil];
     self.url = filePath;
 }