Skip to content
This repository was archived by the owner on Sep 1, 2024. It is now read-only.

Commit 1cdfe00

Browse files
committed
fix: fix destination conflict
fix #31
1 parent ca46dbb commit 1cdfe00

File tree

6 files changed

+25
-5
lines changed

6 files changed

+25
-5
lines changed

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
## [2.1.2](https://github.com/JYC333/obsidian-file-structure-format/compare/2.1.0...2.1.2) (2023-11-12)
2+
3+
4+
### Bug Fixes
5+
6+
* fix destination conflict ([269a304](https://github.com/JYC333/obsidian-file-structure-format/commit/269a30462af0371ecd925a09c6c946747c6101d4)), closes [#31](https://github.com/JYC333/obsidian-file-structure-format/issues/31)
7+
* fix vault config bug ([60084b3](https://github.com/JYC333/obsidian-file-structure-format/commit/60084b3df9e0f27fcf2382c4b8ebeb08605ab38d)), closes [#30](https://github.com/JYC333/obsidian-file-structure-format/issues/30)
8+
9+
10+
111
## [2.1.1](https://github.com/JYC333/obsidian-file-structure-format/compare/2.1.0...2.1.1) (2023-10-26)
212

313

README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,13 @@ git cz
7777
3. Update version
7878

7979
```
80-
npm version run --new=<new_version>
80+
npm run version --new=<new_version>
81+
```
82+
83+
4. Push tag
84+
85+
```
86+
git push origin --tag
8187
```
8288

8389
### LICENSE

manifest.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "obsidian-attachment-name-formatting",
33
"name": "Attachment Name Formatting",
4-
"version": "2.1.1",
4+
"version": "2.1.2",
55
"minAppVersion": "0.12.0",
66
"description": "Obsidian plugin for formatting attachments name (filename attachmentType indexNumber.xxx)",
77
"author": "JYC333",

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "obsidian-attachment-name-formattion",
3-
"version": "2.1.1",
3+
"version": "2.1.2",
44
"description": "Obsidian plugin for formatting attachments name (filename attachmentType indexNumber.xxx)",
55
"main": "main.js",
66
"scripts": {

src/main.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -447,9 +447,12 @@ export default class AttachmentNameFormatting extends Plugin {
447447
});
448448

449449
// Full name including path
450-
const fullName = path
450+
let fullName = path
451451
.join(parent_path, subfolder, newName)
452452
.replaceAll("\\", "/");
453+
if (fullName.startsWith("/")) {
454+
fullName = fullName.slice(1);
455+
}
453456

454457
// Check wether destination is existed, if existed,
455458
// rename the destination file to a tmp name

versions.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@
2323
"1.10.0": "0.12.0",
2424
"2.0.0": "0.12.0",
2525
"2.1.0": "0.12.0",
26-
"2.1.1": "0.12.0"
26+
"2.1.1": "0.12.0",
27+
"2.1.2": "0.12.0"
2728
}

0 commit comments

Comments
 (0)