Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacFileUtils.moveToTrash() doesn't work in a sandboxed app #887

Closed
sobakasu opened this issue Dec 12, 2017 · 2 comments
Closed

MacFileUtils.moveToTrash() doesn't work in a sandboxed app #887

sobakasu opened this issue Dec 12, 2017 · 2 comments

Comments

@sobakasu
Copy link

jna-platform 4.5.0
java version "1.8.0_151"
macOS Sierra 10.12.4

on an app running in a sandbox

FileUtils.getInstance().moveToTrash(files.toArray(new File[0]));

I get an error:

"The trash was not found in its expected location (/Users/andrew/Library/Containers/xxx/Data/.Trash)"

lines 77-81 could probably be safely removed and that would fix the issue. maybe

@matthiasblaesing
Copy link
Member

I pushed integrated the suggested fix. Please give it a spin. You can either build from the PR branches or use the attached binaries.
jna-4.5.1-SNAPSHOT.zip
jna-5.0.0-SNAPSHOT.zip

@matthiasblaesing
Copy link
Member

Fixed in 4.5.1-dev and master.

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

No branches or pull requests

2 participants