dy-sh / obsidian-consistent-attachments-and-links

Obsidian plugin. Move note with attachments.
MIT License
228 stars 24 forks source link

Delete Empty Folders: console error "rm returned EISDIR (is a directory)" #90

Closed suka97 closed 2 months ago

suka97 commented 4 months ago

I've just installed the plugin and run the commands as listed on the README instructions:

  1. Replace All Wiki Links with Markdown Links
  2. Convert All Embed Paths to Relative
  3. Convert All Link Paths to Relative
  4. Collect All Attachments
  5. Delete Empty Folders

All run without issues until step 5. The command didn't display any messages, so I checked the command log: image

I've tried manually deleting this specific folder "C:\Users\asukanec\OneDrive - Grupo Mirgor\Desktop\Notas Mirgor\Test\sub_assets" but the issue remained, now with another empty folder throwing the error.

I'm using Obsidian v1.5.12 on Windows 11 and plugin v1.3.0

mnaoumov commented 2 months ago

@suka97 Should be fixed in https://github.com/dy-sh/obsidian-consistent-attachments-and-links/releases/tag/2.0.0

Feel free to reopen the bug if it is still happening

suka97 commented 2 months ago

I've updated the plugin to last v2.0.0 but now the plugin doesn't work. When I move a markdown file with an attachment it does not move the attachment. On the console the following error is displayed:

image

So I went back to old v1.3.0 which was working for me (besides this issue)

mnaoumov commented 2 months ago

@suka97 can you provide a test vault with the video showing how to reproduce the issue

suka97 commented 2 months ago

Here is a video of the new issue appearing on v2.0.0, as well as v1.3.0 working as it should (besides not emptying the _assets folder)

https://github.com/user-attachments/assets/cd91fa0a-d196-4e57-b600-ed2b3d2c4387

https://github.com/user-attachments/assets/8188ad48-dc4d-41e6-8135-03bb75463e58

Here's my sample Obsidian Vault: ObsidianTemplate.zip

mnaoumov commented 2 months ago

Fixed in https://github.com/dy-sh/obsidian-consistent-attachments-and-links/releases/tag/2.1.0

suka97 commented 2 months ago

The issue regarding getCacheSafe on v2.0.0 was fixed:

I've updated the plugin to last v2.0.0 but now the plugin doesn't work. When I move a markdown file with an attachment it does not move the attachment. On the console the following error is displayed:

image

So I went back to old v1.3.0 which was working for me (besides this issue)

But the original error "rm returned EISDIR" remained:

I've just installed the plugin and run the commands as listed on the README instructions:

  1. Replace All Wiki Links with Markdown Links
  2. Convert All Embed Paths to Relative
  3. Convert All Link Paths to Relative
  4. Collect All Attachments
  5. Delete Empty Folders

All run without issues until step 5. The command didn't display any messages, so I checked the command log: image

I've tried manually deleting this specific folder "C:\Users\asukanec\OneDrive - Grupo Mirgor\Desktop\Notas Mirgor\Test\sub_assets" but the issue remained, now with another empty folder throwing the error.

I'm using Obsidian v1.5.12 on Windows 11 and plugin v1.3.0

I'm testing this with the sample Obsidian Vault attached above, as shown in the video below:

https://github.com/user-attachments/assets/ad91e99d-297e-4b3c-958e-3d9a271db0b2