Commit 416808b
authored
* fix: add missing directory creation to GPX and event exports
- Add std::fs::create_dir_all() to export_to_gpx before file creation
- Add std::fs::create_dir_all() to export_to_event before file creation
- Both functions now match export_to_csv behavior for directory handling
- Fixes issue where exports to non-existent directories would fail with ENOENT
Resolves: #26
* refactor: use compute_export_paths in GPX and event exports for DRY naming
- Replace duplicate filename construction logic in export_to_gpx and export_to_event
- Both functions now use compute_export_paths() for consistent naming with CSV exports
- Reduces code duplication and improves maintainability
- Ensures naming scheme stays in sync across all export formats
Related to: #26
1 parent 65b64cc commit 416808b
1 file changed
Lines changed: 21 additions & 31 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
372 | | - | |
373 | | - | |
374 | | - | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
387 | 382 | | |
388 | | - | |
| 383 | + | |
389 | 384 | | |
390 | 385 | | |
391 | 386 | | |
| |||
434 | 429 | | |
435 | 430 | | |
436 | 431 | | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
444 | 435 | | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
452 | 442 | | |
453 | | - | |
| 443 | + | |
454 | 444 | | |
455 | 445 | | |
456 | 446 | | |
| |||
0 commit comments