{"record":{"id":"dc65c53a512d1681","repo":"yorukot/superfile","slug":"failed-to-create-trash-directory-s-w","errorCode":null,"errorMessage":"failed to create trash directory %s: %w","messagePattern":"failed to create trash directory (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/internal/trash/trash_linux.go","lineNumber":177,"sourceCode":"\n\troot := filepath.Join(topDir, \".Trash-\"+uid)\n\ttd := linuxTrashDir{\n\t\troot:     root,\n\t\tfiles:    filepath.Join(root, \"files\"),\n\t\tinfo:     filepath.Join(root, \"info\"),\n\t\tpathBase: topDir,\n\t}\n\tif create {\n\t\tif err := ensureTrashLayout(td); err != nil {\n\t\t\treturn linuxTrashDir{}, err\n\t\t}\n\t}\n\treturn td, nil\n}\n\nfunc ensureTrashLayout(td linuxTrashDir) error {\n\tif err := os.MkdirAll(td.root, 0o700); err != nil {\n\t\treturn fmt.Errorf(\"failed to create trash directory %s: %w\", td.root, err)\n\t}\n\tif err := ensureOwnedPrivateTrash(td.root); err != nil {\n\t\treturn err\n\t}\n\tfor _, dir := range []string{td.files, td.info} {\n\t\tif err := os.MkdirAll(dir, 0o700); err != nil {\n\t\t\treturn fmt.Errorf(\"failed to create trash directory %s: %w\", dir, err)\n\t\t}\n\t\tif err := ensureOwnedPrivateTrash(dir); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc ensureOwnedPrivateTrash(path string) error {\n\tinfo, err := os.Lstat(path)\n\tif err != nil {","sourceCodeStart":159,"sourceCodeEnd":195,"githubUrl":"https://github.com/yorukot/superfile/blob/b72f550bc6e75913f48eb49fdd258e1a2df2fe88/src/internal/trash/trash_linux.go#L159-L195","documentation":"Error \"failed to create trash directory %s: %w\" thrown in yorukot/superfile.","triggerScenarios":"Thrown at src/internal/trash/trash_linux.go:177 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b72f550bc6e75913f48eb49fdd258e1a2df2fe88","analyzedAt":"2026-09-01T04:38:08.254Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}