android icon indicating copy to clipboard operation
android copied to clipboard

Fix: ensure OneDrive config directory exists before writing file

Open ShortTimeNoSee opened this issue 3 months ago โ€ข 1 comments

This adds config_file.parentFile.mkdirs() in presentation/prebuild.gradle to prevent build failures in clean environments (like Termux, CI containers) whenever presentation/src/main/res/raw/ doesn't exist yet.

This change is platform-safe and has no effect when the directory already exists.

ShortTimeNoSee avatar Oct 07 '25 03:10 ShortTimeNoSee

Walkthrough

The change modifies presentation/prebuild.gradle to ensure the parent directories for a target JSON configuration file are created before writing. It adds a step to create the directory path prior to file output, altering the write path logic accordingly. No other control flow or error handling adjustments are introduced.

Estimated code review effort

๐ŸŽฏ 2 (Simple) | โฑ๏ธ ~10 minutes

Pre-merge checks and finishing touches

โœ… Passed checks (3 passed)
Check name Status Explanation
Title Check โœ… Passed The title clearly and concisely describes the primary change of ensuring the configuration directory exists before writing the file and directly reflects the core fix implemented in the pull request. It avoids unnecessary detail while remaining specific enough for teammates to understand the intent.
Description Check โœ… Passed The description clearly explains the addition of config_file.parentFile.mkdirs() in the specified Gradle file, the problem it addresses in clean environments, and the fact that it is platform-safe, directly matching the changes in the diff.
Docstring Coverage โœ… Passed No functions found in the changes. Docstring coverage check skipped.
โœจ Finishing touches
๐Ÿงช Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment

๐Ÿ“œ Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

๐Ÿ“ฅ Commits

Reviewing files that changed from the base of the PR and between 137dccfb04091a7d1022d771416cbc23d3a5dbb8 and b77c5bbb3ea0f195a25d0151bc928490c15185bb.

๐Ÿ“’ Files selected for processing (1)
  • presentation/prebuild.gradle (1 hunks)
๐Ÿ”‡ Additional comments (1)
presentation/prebuild.gradle (1)

29-29: Good safeguard before writing config file.

Creating the parent directory first prevents the clean-build failures we were seeing and is safe when the path already exists.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

โค๏ธ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Oct 07 '25 03:10 coderabbitai[bot]