Commit 2425888
fix: Add null check for parent directory in S3VolumeManager.downloadFile()
Fixes #212
Added null validation for localPath.getParent() before calling
Files.createDirectories() to prevent NullPointerException in edge cases
where the path has no parent directory.
Changes:
- Store parent path in variable before checking
- Only call Files.createDirectories() if parent is non-null
- Add comment explaining the check
While rare in practice (would require unusual volume path configurations),
this defensive check prevents crashes when dealing with root-level paths
or unusual temporary directory structures.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 232d1a2 commit 2425888
1 file changed
Lines changed: 6 additions & 1 deletion
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
268 | | - | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
269 | 274 | | |
270 | 275 | | |
271 | 276 | | |
| |||
0 commit comments