Skip to content

feat: sources pull#795

Draft
MikeCarbone wants to merge 4 commits into
mainfrom
sources-pull
Draft

feat: sources pull#795
MikeCarbone wants to merge 4 commits into
mainfrom
sources-pull

Conversation

@MikeCarbone
Copy link
Copy Markdown
Member

Description

** Describe what, why and how of the changes clearly and concisely. Add any additional useful context or info, as necessary. **

Todos

** List any todo items necessary before merging, if any. Delete if none. **

  • Sample todo item 1
  • Sample todo item 2

Tasks

** Link to task(s) or issue(s) which this PR corresponds to. Example: KNO-54 **

Screenshots

** Attach any screenshots or recordings to visually illustrate the changes, as necessary. Delete if not relevant. **

@MikeCarbone MikeCarbone marked this pull request as draft May 27, 2026 21:26
@MikeCarbone
Copy link
Copy Markdown
Member Author

@cursor review

Comment thread src/lib/api-v1.ts
Comment thread src/lib/helpers/flat-index.ts Outdated
@MikeCarbone
Copy link
Copy Markdown
Member Author

@cursor review

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit fcf3d6a. Configure here.

await fs.copy(backupDirPath, typeDir.abspath);
} else {
await fs.remove(typeDir.abspath);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Catch block may destroy unmodified directory on backup failure

Low Severity

The catch block unconditionally empties the original directory when typeDir.exists is true, regardless of whether the backup was successfully created. If fs.copy(typeDir.abspath, backupDirPath) on line 64 fails (e.g., disk full or permission error on the temp directory), the original directory has not been modified yet (prune hasn't run), but the catch handler still calls fs.emptyDir followed by fs.copy from an incomplete or missing backup — resulting in potential data loss.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit fcf3d6a. Configure here.

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