{"record":{"id":"d49e9cfcbdcdf236","repo":"yorukot/superfile","slug":"invalid-trash-source-s","errorCode":null,"errorMessage":"invalid trash source %s","messagePattern":"invalid trash source (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/internal/trash/trash_linux.go","lineNumber":227,"sourceCode":"\t\tif err := os.Chmod(path, 0o700); err != nil {\n\t\t\treturn fmt.Errorf(\"failed to restrict trash directory %s: %w\", path, err)\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc validSharedTrash(path string) bool {\n\tinfo, err := os.Lstat(path)\n\tif err != nil || !info.IsDir() || info.Mode()&os.ModeSymlink != 0 {\n\t\treturn false\n\t}\n\treturn info.Mode()&os.ModeSticky != 0\n}\n\nfunc reserveTrashInfo(td linuxTrashDir, srcAbs string) (string, string, string, error) {\n\tbase := filepath.Base(srcAbs)\n\tif base == \".\" || base == string(filepath.Separator) || base == \"\" {\n\t\treturn \"\", \"\", \"\", fmt.Errorf(\"invalid trash source %s\", srcAbs)\n\t}\n\tescapedPath, err := trashInfoPath(td, srcAbs)\n\tif err != nil {\n\t\treturn \"\", \"\", \"\", err\n\t}\n\tdeletionDate := time.Now().Format(trashInfoDateLayout)\n\tcontent := \"[Trash Info]\\nPath=\" + escapedPath + \"\\nDeletionDate=\" + deletionDate + \"\\n\"\n\n\tfor i := range 10_000 {\n\t\tname := candidateTrashName(base, i)\n\t\tinfoPath := filepath.Join(td.info, name+trashInfoSuffix)\n\t\tfilesPath := filepath.Join(td.files, name)\n\t\tif _, err := os.Lstat(filesPath); err == nil {\n\t\t\tcontinue\n\t\t} else if !os.IsNotExist(err) {\n\t\t\treturn \"\", \"\", \"\", err\n\t\t}\n","sourceCodeStart":209,"sourceCodeEnd":245,"githubUrl":"https://github.com/yorukot/superfile/blob/b72f550bc6e75913f48eb49fdd258e1a2df2fe88/src/internal/trash/trash_linux.go#L209-L245","documentation":"Error \"invalid trash source %s\" thrown in yorukot/superfile.","triggerScenarios":"Thrown at src/internal/trash/trash_linux.go:227 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"}