Skip to content

Conversation

Dr1zz3l
Copy link

@Dr1zz3l Dr1zz3l commented Mar 21, 2025

Description:

This edit allows the user to specify path names in filenames. If the specified directories do not exist, they are created recursively to ensure the file can be saved as intended.

Changes Made:

  • Extended src/main.ts to check for missing directories in the specified path.
  • Implemented automatic recursive directory creation for saving files in non-existent paths.
  • Added an example to src/main.ts.

Testing:

  • Verified file creation in both existing and non-existent directory structures.
  • Tested with various path depths.

Why This is Needed:

When the user pastes an image, it gets stored at the root directory. Since this is usually not wanted, it needs to be moved to the desired directory manually.

Disclaimer:

This is my first pull request to a foreign GitHub repo ever and I'm new to TypeScript. If I made any mistakes, please tell me how to do better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant