|
@@ -1686,7 +1686,7 @@ extension KMBrowserWindowController: KMSystemViewMenuProtocol {
|
|
|
return path
|
|
|
} else {
|
|
|
let originalFullFileName = path.lastPathComponent
|
|
|
- let originalFileName = path.lastPathComponent.deletingPathExtension
|
|
|
+ let originalFileName = path.lastPathComponent.deletingPathExtension.lastPathComponent
|
|
|
let originalExtension = path.extension
|
|
|
|
|
|
let startIndex: Int = 0
|
|
@@ -1695,7 +1695,7 @@ extension KMBrowserWindowController: KMSystemViewMenuProtocol {
|
|
|
var i = 1
|
|
|
while (1 != 0) {
|
|
|
var newName = String(format: "%@%ld", originalFileName, i)
|
|
|
- newName = newName.stringByAppendingPathExtension(originalExtension)
|
|
|
+ newName = String(format: "%@%@", newName, originalExtension)
|
|
|
let newPath = fileLocatePath.stringByAppendingPathComponent(newName)
|
|
|
if !dManager.fileExists(atPath: newPath) {
|
|
|
return newPath
|