Last 12 weeks · 0 commits
4 of 6 standards met
Let's say we have a file owned by . Moving this to the currently logged-in user's trash works fine in Finder: you just have to enter your admin password. Problems arise when using instead: doesn't work, and that's probably OK, but a question nonetheless: is there a reason why doesn't work? what works fine is … but the file actually doesn't wind up in the the user's trash directory , as it does in Finder, but in . So it seems that the CLI is only checking which user is executing the command (), but not if that's also the same as the logged-in user, e.g. . If that's true, the CLI should determine the actual home folder of the executing user by running the equivalent of , and then use the trash directory of that user. This bug should be fixed, because users should be able to move non-writable files to their own trash, in the same way it's possible in the Finder.
Continued from https://github.com/sindresorhus/trash/issues/24. This is a really weird issue. Only the first file trashed with in a process will have the ability to from the trash. I've narrowed down the code and the below still only adds for the first file : I'm starting to think this is a OS X bug. Would appriciate being proved wrong, though. Gonna open an issue on radar when I get a chance, unless someone can figure this out.
Repository: sindresorhus/macos-trash. Description: Move files and folders to the trash Stars: 442, Forks: 22. Primary language: Swift. Languages: Swift (97.9%), Shell (2.1%). License: MIT. Topics: macos, swift-package, trash. Latest release: v3.0.0 (4mo ago). Open PRs: 0, open issues: 1. Last activity: 4mo ago. Community health: 71%. Top contributors: sindresorhus, vladimyr, heilerich, lgarron, gingerbeardman, y-vectorfield, kaichaosun.