Skip to content

Commit 9fde95c

Browse files
committed
the folder could exist but could be empty. It's better to check this way
1 parent c9c688d commit 9fde95c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

main.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,8 @@ func oldInstallExists() bool {
453453
if binIsOld {
454454
return false
455455
}
456-
return oldAgentPath.Exist()
456+
oldFiles, _ := oldAgentPath.ReadDir()
457+
return oldFiles.Len() != 0
457458
}
458459

459460
// printDialog will print a GUI error dialog on macos

0 commit comments

Comments
 (0)