(clientId)
| 370 | // window for unregistered channels (e.g. getThumbnail) — which hangs/times out. |
| 371 | const _ipcMainHandle = ipcMain.handle.bind(ipcMain); |
| 372 | ipcMain.handle = (channel, handler) => { |
| 373 | ipcHandlerRegistry.set(channel, handler); |
| 374 | return _ipcMainHandle(channel, handler); |
| 375 | }; |
| 376 | |
| 377 | // Helper function to register IPC handlers and add them to the registry |
| 378 | function registerIpcHandler(channel, handler) { |
| 379 | ipcMain.handle(channel, handler); |
| 380 | } |
| 381 | |
| 382 | // UNC Path Validation Functions |
| 383 | function isUncPath(path) { |
| 384 | if (!path || typeof path !== 'string') { |
| 385 | return false; |
| 386 | } |
| 387 | // UNC paths on Windows start with \\ |
| 388 | // They cannot be local drive paths (C:\, D:\, etc.) |
| 389 | return path.startsWith('\\\\') && !/^[A-Za-z]:/.test(path); |
| 390 | } |
nothing calls this directly
no outgoing calls
no test coverage detected