32 lines
704 B
Go
32 lines
704 B
Go
//go:build !unix
|
|
|
|
package promptdebug
|
|
|
|
import (
|
|
"fmt"
|
|
"path/filepath"
|
|
)
|
|
|
|
// secureDirectory has no enabled implementation on platforms that cannot
|
|
// provide handle-relative, no-follow directory traversal.
|
|
type secureDirectory struct{}
|
|
|
|
func openSecureDirectory(path string) (*secureDirectory, error) {
|
|
if !filepath.IsAbs(path) {
|
|
return nil, fmt.Errorf("directory must be absolute")
|
|
}
|
|
return nil, ErrSecureCaptureUnsupported
|
|
}
|
|
|
|
func (*secureDirectory) Close() error {
|
|
return nil
|
|
}
|
|
|
|
func (*secureDirectory) openDirectory(...string) (*secureDirectory, error) {
|
|
return nil, ErrSecureCaptureUnsupported
|
|
}
|
|
|
|
func (*secureDirectory) writeJSON(string, any) error {
|
|
return ErrSecureCaptureUnsupported
|
|
}
|