Commit 2079fa4
committed
fix #3057: re-upload + detail-view now restore broken mirror links
Three intertwined bugs prevented re-uploading the 5 listed maps from fixing
their "WILL NOT BE DOWNLOADABLE" state:
1. ProbeAndAssign wrote LinkCount = ok ? 1 : 0 based on the springfiles
probe alone, so a local copy on disk could not lift LinkCount above 0
when springfiles 404'd (the actual case for Sever_1.sd7 etc, which
springfiles serves only in lowercase). LinkCount now reflects the total
mirror count; cache state moves to "cf.Links contains springfilesUrl".
2. UploadResource's .Where(ArchiveName == file.FileName) was case-sensitive,
so if unitsync's archive cache reported a different casing than the
browser-supplied filename the result was silently dropped and nothing
was written. Made case-insensitive.
3. UploadResource copied to res.ResourceInfo.ArchiveName but built the URL
from file.FileName, so on case-sensitive FS the URL pointed nowhere.
Copy destination now prefers the DB row's canonical FileName so it
matches what BuildLinks/File.Exists subsequently probes.
Adds ResourceLinkProvider.RefreshLinks(cf): live local check + cached/
deduped springfiles probe, persists if state changed. Called from
UploadResource (with LastLinkCheck cleared to force a fresh probe — the
user re-uploaded specifically to fix a broken map) and from
GetMapDetailData on every detail view (cheap because of the 24 h cache).1 parent 494e5bd commit 2079fa4
2 files changed
Lines changed: 65 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
83 | 101 | | |
84 | | - | |
85 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
86 | 107 | | |
87 | 108 | | |
88 | 109 | | |
89 | | - | |
| 110 | + | |
90 | 111 | | |
91 | 112 | | |
92 | | - | |
| 113 | + | |
93 | 114 | | |
94 | 115 | | |
| 116 | + | |
| 117 | + | |
95 | 118 | | |
96 | 119 | | |
97 | 120 | | |
| |||
107 | 130 | | |
108 | 131 | | |
109 | 132 | | |
110 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
111 | 138 | | |
112 | 139 | | |
113 | 140 | | |
| |||
144 | 171 | | |
145 | 172 | | |
146 | 173 | | |
147 | | - | |
| 174 | + | |
148 | 175 | | |
149 | 176 | | |
150 | 177 | | |
151 | | - | |
| 178 | + | |
152 | 179 | | |
153 | 180 | | |
154 | | - | |
| 181 | + | |
155 | 182 | | |
156 | | - | |
| 183 | + | |
157 | 184 | | |
158 | 185 | | |
159 | 186 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
371 | 379 | | |
372 | 380 | | |
373 | 381 | | |
| |||
433 | 441 | | |
434 | 442 | | |
435 | 443 | | |
436 | | - | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
437 | 450 | | |
438 | 451 | | |
439 | 452 | | |
440 | 453 | | |
441 | 454 | | |
442 | | - | |
443 | 455 | | |
444 | 456 | | |
445 | 457 | | |
446 | 458 | | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
| 459 | + | |
452 | 460 | | |
453 | 461 | | |
454 | 462 | | |
455 | 463 | | |
456 | 464 | | |
457 | 465 | | |
458 | 466 | | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
459 | 474 | | |
460 | 475 | | |
461 | | - | |
462 | | - | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
463 | 480 | | |
464 | 481 | | |
465 | 482 | | |
| |||
470 | 487 | | |
471 | 488 | | |
472 | 489 | | |
473 | | - | |
| 490 | + | |
474 | 491 | | |
475 | | - | |
| 492 | + | |
476 | 493 | | |
477 | 494 | | |
478 | 495 | | |
| |||
482 | 499 | | |
483 | 500 | | |
484 | 501 | | |
485 | | - | |
| 502 | + | |
486 | 503 | | |
487 | 504 | | |
488 | 505 | | |
| |||
0 commit comments