Skip to content

Fix: Path safety. (mkdir if path not already exist, check path)#223

Open
mary4net wants to merge 3 commits into
camel-ai:mainfrom
mary4net:path-safety-pr
Open

Fix: Path safety. (mkdir if path not already exist, check path)#223
mary4net wants to merge 3 commits into
camel-ai:mainfrom
mary4net:path-safety-pr

Conversation

@mary4net

@mary4net mary4net commented Jun 1, 2026

Copy link
Copy Markdown

Why

The original version does the generation before checking the path. If the path does not already exist, the saving will fail and crash, which is a waste of token.

The Fix

  • Added path check, if path not already exist, then create it.
    If couldn't create the file, the error will stop the program before starting to generate anything.

  • Fixed variable name (twitter_channel -> platform_channel).

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