vxcontrol/pentagi · error
%w: a directory already exists at %q
Error message
%w: a directory already exists at %q
What it means
Error "%w: a directory already exists at %q" thrown in vxcontrol/pentagi.
Source
Thrown at backend/pkg/server/services/flow_files.go:2056
txErr = dirErr
break
}
allDirs = append(allDirs, subDirs...)
orphanHashes = append(orphanHashes, subOrphans...)
}
existing, exists, lookErr := findResourceByPath(tx, uid, p.vPath)
if lookErr != nil {
txErr = lookErr
break
}
if exists {
if !force {
txErr = fmt.Errorf("%w: resource already exists at %q", errResourceConflict, p.vPath)
break
}
if existing.IsDir {
txErr = fmt.Errorf("%w: a directory already exists at %q", errResourceConflict, p.vPath)
break
}
if existing.Hash != "" && existing.Hash != p.hash {
orphanHashes = append(orphanHashes, existing.Hash)
}
now := time.Now()
if updErr := tx.Model(&existing).Updates(models.UserResource{
Hash: p.hash, Name: p.name, Size: p.size, UpdatedAt: now,
}).Error; updErr != nil {
txErr = updErr
break
}
existing.Hash, existing.Name, existing.Size, existing.UpdatedAt = p.hash, p.name, p.size, now
updated = append(updated, existing)
continue
}
rec := models.UserResource{View on GitHub (pinned to ea665308ba)
When it happens
Trigger: Thrown at backend/pkg/server/services/flow_files.go:2056 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of vxcontrol/pentagi@ea665308ba (2026-09-01).
Data as JSON: /api/errors/7d044fbe11300f4f.
Report an issue: GitHub.