Commit fa2a354
committed
Fix #4843: Redundant hash in ghcide cache path
Reasoning:
The upstream logic might send unit ID that already has a hash appended to it to prevent collision.
Later in the pipeline , the getCacheDirsDefault function blindly appends the opts hash again to generate the cache path. This results in a duplicated hash (main-<hash>-<hash>).
This patch does a simple isSuffixOf check to ensure the hash is only appended by the getCacheDirsDefalut if wansn't already appened upstream, keeping the cache directory clean.1 parent b3b71b7 commit fa2a354
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1220 | 1220 | | |
1221 | 1221 | | |
1222 | 1222 | | |
1223 | | - | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
1224 | 1228 | | |
1225 | 1229 | | |
1226 | 1230 | | |
| |||
0 commit comments