Skip to content

Commit 1d347ca

Browse files
committed
Debugging some shit
Summary: Test Plan:
1 parent 772c0c3 commit 1d347ca

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/main/fileUtils.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,13 @@ import path from 'path';
66
export const ENCRYPTED_FILE_EXTENSION = '.deadbolt';
77
export const LEGACY_ENCRYPTED_FILE_EXTENSION = '.dbolt';
88

9-
export default function prettyPrintFilePath(filePath: string): string {
9+
export default function prettyPrintFilePath(
10+
filePath: string | undefined,
11+
): string {
12+
if (filePath == null) {
13+
console.log('filePath is null. something is fucked');
14+
return '';
15+
}
1016
console.log('prettyPrintFilePath', '{', filePath, '}');
1117
// Create a local variable instead of modifying the parameter
1218
let prettyPath = filePath;

src/renderer/FileUpload.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export default function FileUpload({
1919

2020
// Drag-and-drop doesn't give us the file path, so we need to use this super hacky workaround: https://github.com/react-dropzone/file-selector/issues/10#issuecomment-2482649010
2121
const onDrop = (event: React.DragEvent<HTMLDivElement>) => {
22+
console.log('detected file drop event', event);
2223
event.preventDefault();
2324
const file = event.dataTransfer?.files[0];
2425
if (file != null) {

0 commit comments

Comments
 (0)