1
0
mirror of https://github.com/juanfont/headscale.git synced 2025-09-25 17:51:11 +02:00

integration: validate expected online status in ping

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
Kristoffer Dalby 2025-08-27 16:11:36 +02:00
parent 64028e25af
commit a7c602ef26
No known key found for this signature in database

View File

@ -664,6 +664,7 @@ func extractTarToDirectory(tarData []byte, targetDir string) error {
// Skip the top-level directory itself // Skip the top-level directory itself
continue continue
} }
// Skip empty paths after stripping // Skip empty paths after stripping
if cleanName == "" { if cleanName == "" {
continue continue
@ -682,6 +683,7 @@ func extractTarToDirectory(tarData []byte, targetDir string) error {
if err := os.MkdirAll(filepath.Dir(targetPath), 0o755); err != nil { if err := os.MkdirAll(filepath.Dir(targetPath), 0o755); err != nil {
return fmt.Errorf("failed to create parent directories for %s: %w", targetPath, err) return fmt.Errorf("failed to create parent directories for %s: %w", targetPath, err)
} }
// Create file // Create file
outFile, err := os.Create(targetPath) outFile, err := os.Create(targetPath)
if err != nil { if err != nil {