| 115 | ]) |
| 116 | |
| 117 | function isBlockedDevicePath(filePath: string): boolean { |
| 118 | if (BLOCKED_DEVICE_PATHS.has(filePath)) return true |
| 119 | // /proc/self/fd/0-2 and /proc/<pid>/fd/0-2 are Linux aliases for stdio |
| 120 | if ( |
| 121 | filePath.startsWith('/proc/') && |
| 122 | (filePath.endsWith('/fd/0') || |
| 123 | filePath.endsWith('/fd/1') || |
| 124 | filePath.endsWith('/fd/2')) |
| 125 | ) |
| 126 | return true |
| 127 | return false |
| 128 | } |
| 129 | |
| 130 | // Narrow no-break space (U+202F) used by some macOS versions in screenshot filenames |
| 131 | const THIN_SPACE = String.fromCharCode(8239) |