Skip to content

Fix dragndrop#644

Open
roymacdonald wants to merge 4 commits into
openframeworks:masterfrom
roymacdonald:fix-dragndrop
Open

Fix dragndrop#644
roymacdonald wants to merge 4 commits into
openframeworks:masterfrom
roymacdonald:fix-dragndrop

Conversation

@roymacdonald

Copy link
Copy Markdown
Contributor

Drag and drop a folder into PG now works. I only tested it on macos.
Reason (given by claude code):
app.js:914 reads files[0].path. Electron removed the File.path augmentation (deprecated v30, gone by the v32+
line — you're on 35.7.5). So files[0].path is now undefined, and path.normalize(undefined + '/..') produces a garbage
path. The import button is unaffected because it gets real paths from the native dialog in the main process, not from a
File object.

The fix is to use webUtils.getPathForFile(file), which replaces File.path.

The rest is a css fix so the drop zone is over the whole windon and not towards the bottom as it has been for a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant