NorfairKing / super-user-spark

A safe way to never worry about your beautifully configured system again. (NO LONGER MAINTAINED. Use Nixos instead.)
MIT License
93 stars 9 forks source link

Spark assumes unlink is in /bin #10

Closed plietar closed 8 years ago

plietar commented 8 years ago

On OS X (at least) it is in /usr/bin/unlink Why is it even required ? Can't you just use rmFile ?

NorfairKing commented 8 years ago

I think rmFile will remove the file that the link points to. Feel free to try it out and send a pull-request.

plietar commented 8 years ago

rmFile uses System.removeFile. The documentation is unclear, but System.removeFile (on POSIX) calls Posix.Files.removeLink, which uses unlink(3), which according to the man page only removes the symlink, not the target :smile:

NorfairKing commented 8 years ago

If I make a pull-request with a fix, will you try it out and tell me whether that fixes the problem for you?