fix(sync): Fixed an issue where deleted folders would be restored.

This commit is contained in:
2025-11-05 15:43:26 -05:00
parent 35519550ed
commit 9ab72a25fa

View File

@@ -99,8 +99,8 @@ func getGitRemotes(dir string) []string {
func (file EnvFile) Restore() error { func (file EnvFile) Restore() error {
// TODO: Handle restores more cleanly // TODO: Handle restores more cleanly
// Ensure the directory exists // Ensure the directory exists
if err := os.MkdirAll(filepath.Dir(file.Path), 0755); err != nil { if _, err := os.Stat(file.Dir); err != nil {
return fmt.Errorf("failed to create directory: %w", err) return fmt.Errorf("directory missing")
} }
// Check if file already exists // Check if file already exists