[import] Caching issue when url paths iare both filename and subpath
- Dominant language
- JavaScript
- Stars
- 68
- Forks
- 72
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 8
Description
**Description**
When caching following URLs:
1. http://wilson.com/en-us/blog (no extension)
2. http://wilson.com/en-us/blog/basketball/events/wilson-takes-paris-storm-recap-nba-paris-game-2024
Request `1.` will create local **file** `/en-us/blog`
Then, caching `2.` (or any other `/en-us/blog/**` path) will fail as it cannot create **folder** `/en-us/blog` (as the path already exists as a file)
**To Reproduce**
1. Start the AEM importer `aem import --cache /tmp/cache`
2. In the importer UI, import http://wilson.com/en-us/blog
3. Check `/tmp/cache/en-us/blog` **file** got created
4. Import http://wilson.com/en-us/blog/basketball/events/wilson-takes-paris-storm-recap-nba-paris-game-2024
=> Notice the cached file is not created + error message in the CLI log
**Expected behavior**
The CLI should handle such case.
Contributor guide
Research direction
Start the AEM importer with `aem import --cache /tmp/cache` and reproduce the two URL imports described in the issue. Trace the cache path handling for `/en-us/blog` and its nested URL; done means both cached paths are created without a file-versus-folder error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100