Repository navigation
chore: move to .NET 11 and fix reported extraction issues - #17
Merged
Merged
Conversation
Retarget the app and tests to net11.0/net11.0-windows, build the five libraries for net11.0 as well, bump Avalonia to 12.1.6, SharpCompress to 0.50.9 and the analyzers to 3.0.339, and update the CI, release, docs and version tables to match.
- Repair a missing Unix execute bit on bundled tools before starting them, fall back to PATH when the file cannot be made executable, and report the tool path plus the chmod remedy when it still cannot start (#69847). - Treat an unwritable extraction destination as a folder/permission problem: name the folder and the remedy, keep CHD header diagnostics out of the message, and do not file a bug report for it (#69841, #69842, #69843). - Keep the source-size pre-flight alive when the MDSSharp assembly cannot be loaded, so a non-MDS batch still starts and the conversion path reports the real problem (#69844). - Add regression tests for the execute-bit repair, an unstartable tool, the new folder message and its bug-report exclusion.
Comment on lines
+1330
to
+1333
| var fakeTool = Path.Combine( | ||
| _tempDir, | ||
| OperatingSystem.IsWindows() ? "fake7za.exe" : "fake7za" | ||
| ); |
| ); | ||
| File.WriteAllText(fakeTool, "not an executable"); | ||
| var service = new ArchiveService(fakeTool, true); | ||
| var corruptPath = Path.Combine(_tempDir, "corrupt-unstartable.7z"); |
| var service = new ArchiveService(fakeTool, true); | ||
| var corruptPath = Path.Combine(_tempDir, "corrupt-unstartable.7z"); | ||
| File.WriteAllText(corruptPath, "not a 7z archive"); | ||
| var tempDir = Path.Combine(_tempDir, "extract"); |
| { | ||
| // Discovery uses the result to skip to the next candidate instead of returning a path that | ||
| // Process.Start cannot run. | ||
| var missing = Path.Combine(Path.GetTempPath(), $"missing_tool_{Guid.NewGuid():N}"); |
| { | ||
| // Some archive managers extract the release zip without Unix modes, which leaves the | ||
| // bundled 7zz at 0644 and makes Process.Start fail with "Permission denied". | ||
| var tool = Path.Combine(Path.GetTempPath(), $"tool_{Guid.NewGuid():N}"); |
| [Fact] | ||
| public void OutputDirectoryUnavailableExceptionNamesTheFolderAndReason() | ||
| { | ||
| var directory = Path.Combine(Path.GetTempPath(), "protected-output"); |
Comment on lines
+1330
to
+1333
| var fakeTool = Path.Combine( | ||
| _tempDir, | ||
| OperatingSystem.IsWindows() ? "fake7za.exe" : "fake7za" | ||
| ); |
| ); | ||
| File.WriteAllText(fakeTool, "not an executable"); | ||
| var service = new ArchiveService(fakeTool, true); | ||
| var corruptPath = Path.Combine(_tempDir, "corrupt-unstartable.7z"); |
| var service = new ArchiveService(fakeTool, true); | ||
| var corruptPath = Path.Combine(_tempDir, "corrupt-unstartable.7z"); | ||
| File.WriteAllText(corruptPath, "not a 7z archive"); | ||
| var tempDir = Path.Combine(_tempDir, "extract"); |
| { | ||
| // Discovery uses the result to skip to the next candidate instead of returning a path that | ||
| // Process.Start cannot run. | ||
| var missing = Path.Combine(Path.GetTempPath(), $"missing_tool_{Guid.NewGuid():N}"); |
| { | ||
| // Some archive managers extract the release zip without Unix modes, which leaves the | ||
| // bundled 7zz at 0644 and makes Process.Start fail with "Permission denied". | ||
| var tool = Path.Combine(Path.GetTempPath(), $"tool_{Guid.NewGuid():N}"); |
| [Fact] | ||
| public void OutputDirectoryUnavailableExceptionNamesTheFolderAndReason() | ||
| { | ||
| var directory = Path.Combine(Path.GetTempPath(), "protected-output"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
net11.0/net11.0-windows, build the five libraries fornet11.0too, bump Avalonia to 12.1.6, SharpCompress to 0.50.9 and the analyzers to 3.0.339, and update CI, the release workflow, docs and version tables.Fixes
7zzpermission denied: repair missing execute bits on bundled tools at startup, fall back toPATHwhen they cannot be repaired, and report the tool path plus thechmod +xremedy when it still cannot start._extract_temp_*: extraction now names the output folder, the reason and the remedy instead of dumping CHD header fields and saying the file may be corrupt. The condition is excluded from bug reports.MDSSharpassembly load failure no longer aborts the batch in the source-size pre-flight; the input is counted and the batch continues, with the real conversion path reporting any genuine MDS problem.Verification
dotnet build CSharp_CHDStudio.sln -c Release- 0 warnings, 0 errorsdotnet test CHDStudio.Tests/CHDStudio.Tests.csproj -c Release- 1304 passedjb inspectcode --output=InspectCode.log CSharp_CHDStudio.sln- 0 warnings/errors (notes only)Not addressed here: #69728 (already fixed in 3.13.x), #69739 (needs the reported PBP file), and the BatchConvertToCHD reports (legacy app/repo).