Files
weatherreporter/internal/promptdebug/secure_directory_other.go

32 lines
704 B
Go
Raw Permalink Normal View History

2026-08-13 01:28:49 +00:00
//go:build !unix
package promptdebug
import (
"fmt"
"path/filepath"
)
2026-08-13 13:52:16 +00:00
// secureDirectory has no enabled implementation on platforms that cannot
// provide handle-relative, no-follow directory traversal.
type secureDirectory struct{}
2026-08-13 01:28:49 +00:00
func openSecureDirectory(path string) (*secureDirectory, error) {
if !filepath.IsAbs(path) {
return nil, fmt.Errorf("directory must be absolute")
}
2026-08-13 13:52:16 +00:00
return nil, ErrSecureCaptureUnsupported
2026-08-13 01:28:49 +00:00
}
2026-08-13 13:52:16 +00:00
func (*secureDirectory) Close() error {
2026-08-13 01:28:49 +00:00
return nil
}
2026-08-13 13:52:16 +00:00
func (*secureDirectory) openDirectory(...string) (*secureDirectory, error) {
return nil, ErrSecureCaptureUnsupported
2026-08-13 01:28:49 +00:00
}
2026-08-13 13:52:16 +00:00
func (*secureDirectory) writeJSON(string, any) error {
return ErrSecureCaptureUnsupported
2026-08-13 01:28:49 +00:00
}