mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-08-11 20:32:11 +00:00
Updated the ZIP backslash shim documentation
This commit is contained in:
parent
351ee046b6
commit
d028cec0ba
@ -4,8 +4,9 @@ namespace AIStudio.Tools.PluginSystem;
|
||||
|
||||
public static class PluginArchive
|
||||
{
|
||||
// Compatibility shim for Windows-created ZIPs with backslashes in entry names (dotnet/runtime#27620).
|
||||
// See documentation/compatibility-shims/2026-07-enterprise-config-zip-backslashes.md.
|
||||
// Compatibility shim for Windows-created ZIPs with backslashes in entry names (dotnet/runtime#27620);
|
||||
// remove after dotnet/runtime#27620 and #41914 are fixed.
|
||||
// See documentation/compatibility-shims/2026-07-plugin-archive-zip-backslashes.md.
|
||||
public static void Extract(string sourceArchiveFileName, string destinationDirectory)
|
||||
{
|
||||
using var archive = ZipFile.OpenRead(sourceArchiveFileName);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
# Enterprise Configuration ZIP Backslashes
|
||||
# Plugin Archive ZIP Backslashes
|
||||
|
||||
- Status: Active
|
||||
- Introduced: 2026-07-09
|
||||
@ -14,9 +14,11 @@ Some enterprise administrators create configuration plugin ZIP files on Windows.
|
||||
|
||||
Without this shim, Unix systems extract those entries as files whose names contain literal backslash characters. The plugin loader then cannot find `plugin.lua`, so the enterprise configuration plugin is not activated.
|
||||
|
||||
The same applies to plugin archives that users import from their disk. Archives created by AI Studio itself always use forward slashes. However, users may import archives that were packaged by hand or with another tool on Windows, so the import path needs the same tolerance. Otherwise, importing such an archive fails because `plugin.lua` cannot be found.
|
||||
|
||||
## Compatibility Behavior
|
||||
|
||||
AI Studio manually extracts configuration and imported assistant-plugin archives/ ZIP files. During extraction, entry names are normalized so both `/` and `\` are treated as archive path separators.
|
||||
AI Studio manually extracts enterprise configuration plugin archives and plugin archives imported by users. During extraction, entry names are normalized so both `/` and `\` are treated as archive path separators.
|
||||
|
||||
The extraction still preserves the archive structure and validates each entry before writing it to disk. Rooted paths, drive-qualified paths, and parent-directory traversal paths are rejected.
|
||||
|
||||
@ -23,7 +23,7 @@ Every compatibility shim must have:
|
||||
|
||||
- Status: Active
|
||||
- Introduced: YYYY-MM-DD
|
||||
- Remove after: YYYY-MM-DD
|
||||
- Remove after: YYYY-MM-DD or a condition e.g., someone is solving an issue on a dependency
|
||||
- Code references:
|
||||
- path/to/file.cs
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user