selkhateeb / hardlink

a simple command-line utility that implements hardlinks on Mac OsX
486 stars 45 forks source link

Folders not getting deleted after unlinking - Finder #30

Open kulal opened 7 years ago

kulal commented 7 years ago

I am able to implement hardlinks on macOS using this command-line utility, but I am seeing an issue after unlinking an folder. Issue: Unable to delete the unlinked folder from finder (command used to unlink "hln -u destination") same folder can be deleted from terminal using "rm"

Any idea where the permission is getting changed ? and what might be the cause for this issue.

jamespayne commented 7 years ago

What version of command line tools are you using?

pkgutil --pkg-info=com.apple.pkg.CLTools_Executables

Not sure this is the right way to do it but I get: version: 8.2.0.0.1.1480973914

kulal commented 7 years ago

Version of command line tool is : 8.1.0.0.1.1476494586

I have even verified this using the latest version of Xcode command line tool

jamespayne commented 7 years ago

Are you compiling the source or installing via homebrew?

jamespayne commented 7 years ago

I just tried what you mentioned above. Can't reproduce this. What are the permissions on the folders?

kulal commented 7 years ago

Please try to replicating the issue in this way: Create a folder under /Users/user/Desktop/Unlinked-folder Source: /Users/user/Desktop/Unlinked-folder Destination: /Users/user/linked

Command to hard link folder: hln /Users/user/Desktop/Unlinked-folder /Users/user/linked/Unlinked-folder

Now if I try to delete the (source) /Users/user/Desktop/Unlinked-folder or (destination) /Users/user/linked/Unlinked-folder

I get promoted with admin credentials to authenticate, but even after giving the password the folders will remain without deleting: screen shot 2017-02-13 at 6 10 07 pm screen shot 2017-02-13 at 6 10 59 pm screen shot 2017-02-13 at 6 14 00 pm

Even after removing hard link i am unable to delete the source folder : /Users/user/Desktop/Unlinked-folder

Only way to delete is through terminal... running "rm -r"

Is this the normal behavior or am i missing any thing here..?

jvsteiner commented 7 years ago

I had this issue too, when trying to delete the usual way in finder. a sudo rm -rf works though

alt-jero commented 6 years ago

This may be a protection against orphaning files... Which version of macOS are each of you using?

jvsteiner commented 6 years ago

I believe it was El Capitan. This was a year ago though, so I might be wrong.

alt-jero commented 6 years ago

My thinking is that if it was happening for you and @kulal but not for @jamespayne , and @jamespayne happened to be using an older macOS, that the issue might be something Apple implemented as a feature. @kulal, @jamespayne : ideas?