Commit 6d9584f
committed
* I updated the setOptions function so it now also returns the generated hashBytes inside the monadic tuple (earlier, it was only returning the flags and the target).
* To thread this down, I added a new rawComponentHash field as a Maybe B.ByteString to the RawComponentInfo data type. This passes the hash from setOptions straight into getCacheDirsDefault.
* Inside getCacheDirsDefault, I added a check:
* If we have Just mFirstHash, I set the prefix to 'main'. Then, I initiate a new hash and update it with mFirstHash using H.updates, storing this mutated context as baseCtx.
* If it's Nothing, baseCtx just gets a standard H.init.
* Finally, for opts_hash, it takes that baseCtx and updates it with the opts string (converted via B.pack). This gives out the final 40-character hex string for the SHA1 hash.
(Also updated getCacheDirs in the session loading to accept the ByteString).
This keeps the path short and stops Windows from crashing1 parent 7d02159 commit 6d9584f
1 file changed
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
682 | 683 | | |
683 | 684 | | |
684 | 685 | | |
| 686 | + | |
685 | 687 | | |
686 | 688 | | |
| 689 | + | |
687 | 690 | | |
688 | 691 | | |
689 | 692 | | |
| |||
1072 | 1075 | | |
1073 | 1076 | | |
1074 | 1077 | | |
| 1078 | + | |
1075 | 1079 | | |
1076 | 1080 | | |
| 1081 | + | |
1077 | 1082 | | |
1078 | 1083 | | |
1079 | 1084 | | |
| |||
1102 | 1107 | | |
1103 | 1108 | | |
1104 | 1109 | | |
| 1110 | + | |
1105 | 1111 | | |
1106 | 1112 | | |
1107 | 1113 | | |
| |||
0 commit comments