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

Function handleKeyDown

renderer.js:16526–16530  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

16524 // Validate that we have a directory path, not a file path
16525 // Check for common file extensions (case-insensitive)
16526 const lowerPath = directoryFilterPath.toLowerCase();
16527 if (directoryFilterPath && (lowerPath.endsWith('.zip') || lowerPath.endsWith('.stl') || lowerPath.endsWith('.3mf') || lowerPath.endsWith('.obj') || lowerPath.endsWith('.ply'))) {
16528 console.warn('Directory filter appears to be a file path, extracting parent directory:', directoryFilterPath);
16529 const lastSlash = Math.max(directoryFilterPath.lastIndexOf('\\'), directoryFilterPath.lastIndexOf('/'));
16530 directoryFilterPath = lastSlash > 0 ? directoryFilterPath.substring(0, lastSlash) : '';
16531 }
16532
16533 // Final validation: ensure we don't have a file path

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected