Skip to content

Commit 20e1f26

Browse files
ozgesolidkeyclaude
andcommitted
Show all non-binary files in folder panel, including media files
Replace whitelist approach with binary exclusion list. All text files regardless of extension are now visible. Video and audio files are also shown (images already supported, video player exists in bottom panel). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent d29e68a commit 20e1f26

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

src/main/index.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,8 +1629,17 @@ ipcMain.handle(IPC.READ_FOLDER, async (_, folderPath: string) => {
16291629

16301630
if (entry.isFile()) {
16311631
const ext = path.extname(entry.name).toLowerCase();
1632-
// Include text-based files or files without extension
1633-
if (TEXT_EXTENSIONS.has(ext) || IMAGE_EXTENSIONS.has(ext) || ext === '') {
1632+
// Exclude known binary formats, show everything else (text + images)
1633+
const BINARY_EXTENSIONS = new Set([
1634+
'.exe', '.dll', '.so', '.dylib', '.o', '.a', '.lib',
1635+
'.zip', '.tar', '.gz', '.bz2', '.xz', '.7z', '.rar', '.zst',
1636+
'.bin', '.dat', '.db', '.sqlite', '.sqlite3',
1637+
'.class', '.pyc', '.pyo', '.wasm',
1638+
'.dmg', '.iso', '.img',
1639+
'.pdf', '.doc', '.docx', '.xls', '.xlsx', '.ppt', '.pptx',
1640+
'.ttf', '.otf', '.woff', '.woff2', '.eot',
1641+
]);
1642+
if (!BINARY_EXTENSIONS.has(ext)) {
16341643
try {
16351644
const stat = await fs.promises.stat(fullPath);
16361645
files.push({

0 commit comments

Comments
 (0)