|
|
|
@ -318,7 +318,7 @@ class FileManager extends Plugin { |
|
|
|
|
await this._handleExists(dest, `Cannot paste content into ${dest}. Path does not exist.`) |
|
|
|
|
await this._handleIsDir(dest, `Cannot paste content into ${dest}. Path is not directory.`) |
|
|
|
|
const content = await this.readFile(src) |
|
|
|
|
let copiedFilePath = dest + (customName ? '/' + customName : '/' + `Copy_${helper.extractNameFromKey(src)}`) |
|
|
|
|
let copiedFilePath = dest + (customName ? '/' + customName : '/' + `${helper.extractNameFromKey(src)}`) |
|
|
|
|
copiedFilePath = await helper.createNonClashingNameAsync(copiedFilePath, this) |
|
|
|
|
|
|
|
|
|
await this.writeFile(copiedFilePath, content) |
|
|
|
|