Skip to content

Commit 90c3d87

Browse files
committed
fix(uninstall): resolve SkipDir error propagation and proper IDE grandparent mapping
1 parent e3c7f2a commit 90c3d87

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

internal/uninstall/uninstall.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,10 @@ func scanAndCleanRagcodeDirs(home string, registryRoots []string) {
472472
depth = strings.Count(rel, string(os.PathSeparator)) + 1
473473
}
474474
if depth > maxDepth {
475-
return filepath.SkipDir
475+
if info != nil && info.IsDir() {
476+
return filepath.SkipDir
477+
}
478+
return nil
476479
}
477480
if info.IsDir() {
478481
name := info.Name()
@@ -624,6 +627,12 @@ func detectIDEProjectParents(home string) []string {
624627
// config file's parent dir (the IDE data dir, e.g. ~/.cursor)
625628
dataDir := filepath.Dir(ide.path)
626629
addProject(filepath.Join(dataDir, ".ragcode-ide-sentinel"))
630+
631+
// also add the grandparent dir (e.g. ~/.codeium, ~/.config/zed)
632+
grandparent := filepath.Dir(dataDir)
633+
if grandparent != "" && grandparent != dataDir {
634+
addProject(filepath.Join(grandparent, ".ragcode-ide-sentinel"))
635+
}
627636
}
628637

629638
return parents

pkg/workspace/detector/detector.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ func DefaultOptions() Options {
5454
".vs",
5555
".cursor",
5656
".windsurf",
57+
".claude",
5758
"AGENTS.md",
5859
"CLAUDE.md",
5960
},

0 commit comments

Comments
 (0)