fix: ensure parent directories exist before extracting files
extractDir was writing files without creating parent directories first, causing "The system cannot find the path specified" errors on Windows when models.json was walked before the data/ directory entry. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
ecabffc890
commit
9110e1647d
@ -378,6 +378,11 @@ func (inst *Installer) extractDir(embedDir, destDir string) error {
|
||||
return os.MkdirAll(outPath, 0755)
|
||||
}
|
||||
|
||||
// Ensure parent directory exists
|
||||
if err := os.MkdirAll(filepath.Dir(outPath), 0755); err != nil {
|
||||
return fmt.Errorf("create dir for %s: %w", outPath, err)
|
||||
}
|
||||
|
||||
data, err := inst.payload.ReadFile(path)
|
||||
if err != nil {
|
||||
return fmt.Errorf("read embedded %s: %w", path, err)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user