MCPcopy Create free account
hub / github.com/TechJeeper/Printventory / trackActiveUser

Function trackActiveUser

main.js:372–387  ·  view source on GitHub ↗
(clientId)

Source from the content-addressed store, hash-verified

370// window for unregistered channels (e.g. getThumbnail) — which hangs/times out.
371const _ipcMainHandle = ipcMain.handle.bind(ipcMain);
372ipcMain.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
378function registerIpcHandler(channel, handler) {
379 ipcMain.handle(channel, handler);
380}
381
382// UNC Path Validation Functions
383function 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected