|
@@ -127,15 +127,15 @@ class KMPDFConvert: Operation {
|
|
|
|
|
|
|
|
|
if convertType == .jpeg || convertType == .jpg || convertType == .png || convertType == .gif || convertType == .tga || convertType == .bmp || convertType == .jp2 || convertType == .tiff {
|
|
|
- if (self.convertType == .jpeg || self.convertType == .png) {
|
|
|
- self.outputFilePath = "\(path)/\(fileName).zip"
|
|
|
- } else {
|
|
|
+// if (self.convertType == .jpeg || self.convertType == .png) {
|
|
|
+// self.outputFilePath = "\(path)/\(fileName).zip"
|
|
|
+// } else {
|
|
|
path.append("/")
|
|
|
path.append(fileName)
|
|
|
- // let folderPath = getUniqueFilePath(filePath: path)
|
|
|
+ let folderPath = getUniqueFilePath(filePath: path)
|
|
|
try?FileManager.default.createDirectory(atPath: path, withIntermediateDirectories: false)
|
|
|
- outputFilePath = path
|
|
|
- }
|
|
|
+ outputFilePath = folderPath
|
|
|
+// }
|
|
|
} else {
|
|
|
if !pathExtension.isEmpty {
|
|
|
fileName.append(".")
|
|
@@ -143,9 +143,9 @@ class KMPDFConvert: Operation {
|
|
|
|
|
|
path.append("/")
|
|
|
path.append(fileName)
|
|
|
-// let folderPath = getUniqueFilePath(filePath: path)
|
|
|
+ let folderPath = getUniqueFilePath(filePath: path)
|
|
|
|
|
|
- outputFilePath = path
|
|
|
+ outputFilePath = folderPath
|
|
|
} else {
|
|
|
outputFolderPath.append("/")
|
|
|
outputFolderPath.append(outputFileName)
|