|
@@ -50,16 +50,20 @@ typealias KMMainDocumentCloudUploadHanddler = (@escaping(Bool, String)->()) -> (
|
|
|
var currentDocumentSetup: [String: Any] {
|
|
|
get {
|
|
|
var tempSetup: [String: Any] = [:]
|
|
|
- var tempMainSetup: [String: Any] = mainViewController?.currentSetup() ?? [:]
|
|
|
- let data = (fileURL != nil) ? SKAlias.init(url: fileURL).data : nil
|
|
|
+ let tempMainSetup: [String: Any] = mainViewController?.currentSetup() ?? [:]
|
|
|
let filePath = fileURL?.path ?? ""
|
|
|
-
|
|
|
- tempSetup.updateValue(filePath, forKey: KMDocumentSetupFileNameKey)
|
|
|
- if data != nil {
|
|
|
- tempSetup.updateValue(data!, forKey: KMDocumentSetupAliasKey)
|
|
|
+ if filePath.count > 0{
|
|
|
+ tempSetup.updateValue(filePath, forKey: KMDocumentSetupFileNameKey)
|
|
|
+ }else {
|
|
|
+ return tempSetup
|
|
|
+ }
|
|
|
+ if let alias = SKAlias.init(url: fileURL){
|
|
|
+ if let data = alias.data{
|
|
|
+ tempSetup.updateValue(data as Any, forKey: KMDocumentSetupAliasKey)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- if tempSetup.count != 0 {
|
|
|
+ if tempSetup.count > 0 {
|
|
|
tempSetup.merge(tempMainSetup) { (_, new) in new }
|
|
|
}
|
|
|
return tempSetup
|