diff --git a/src/main.ts b/src/main.ts index a8674bf..3b15cf0 100644 --- a/src/main.ts +++ b/src/main.ts @@ -334,7 +334,7 @@ export default class PasteImageRenamePlugin extends Plugin { dupNameNumbers.push(parseInt(m.groups.number)) } - if (isNewNameExist) { + if (isNewNameExist || this.settings.dupNumberAlways) { // get max number const newNumber = dupNameNumbers.length > 0 ? Math.max(...dupNameNumbers) + 1 : 1 // change newName @@ -616,7 +616,7 @@ class SettingTab extends PluginSettingTab { new Setting(containerEl) .setName('Always add duplicate number') - .setDesc(`If enabled, duplicate number will always be added to the image name, otherwise it will only be added when the name is duplicated.`) + .setDesc(`If enabled, duplicate number will always be added to the image name. Otherwise, it will only be added when the name is duplicated.`) .addToggle(toggle => toggle .setValue(this.plugin.settings.dupNumberAlways) .onChange(async (value) => {