14 Commits
Author SHA1 Message Date
Rajiv Shah 9c13919fd8 Run SwiftLint autocorrect 2020-05-25 17:06:53 -04:00
Zorg b56910f455 Remove the old app/bundle instead of moving it to the trash
Fixes #827
2016-12-28 22:01:00 -05:00
Kornel Lesiński a1095ff29c Null fix 2016-12-23 20:00:45 +01:00
Kornel Lesiński 657e3d47d0 Removed unnecessary nullability 2016-12-23 16:25:09 +01:00
Kornel Lesiński 464972126c Unwrap early 2016-12-21 16:44:04 +01:00
Zorg ed5dca3423 Update unit tests to Swift 3 2016-09-14 23:05:05 -04:00
Jake Petroules bb624ffa59 Replace OS X with macOS or more generic terminology. 2016-06-15 13:46:19 -07:00
Zorg be1e86174a Wait for the appropriate process when authorizing file operations
This changes the way we authorize & execute commands, and how we wait for their completion. In order to obtain the correct child to wait (instead of another one terminating intermediately), we use a wrapper tool (fileop) to output its pid onto the communication pipe that we read from the other end.
2016-06-08 21:49:58 -04:00
Zorg d263bf4fd0 Don't follow symbolic links for file operations
This fixes issues with updating modification/access time, and changing owner/group
where symbolic links used to be followed. Symbolic link tests are included.
2016-04-11 03:05:53 -04:00
Zorg 6818d1f180 Verify existence of destination parent directory for moving/copying 2015-10-10 00:12:58 -04:00
Zorg ee72ec3dab Fix issues with copying files from different mounted drives
The move operation now does an explict copy & remove.

We also copy items using FSCopyObjectSync due to issues
existing in copyfile (and NSFileManager).

Both of these fix bugs in some cases where items cannot be moved
from one network drive to another. In my testing before this patch,
I was unable to get the test application to launch and was unable
to move the old installation to the trash.
2015-10-09 23:58:23 -04:00
Zorg 9b74309eb5 Make allowsAuthorization apply to all of SUFileManager's methods 2015-10-09 17:49:46 -04:00
Zorg 6af2fbfb6e Update modification & access time for new update
If we don't do this, Finder may not report the correct file size for the new update.
The system also may not register the new app in its database if we don't do this.

We may have been able to get away with not doing this before because we used to perform a copy
to install the update. However, now updates in some cases can be done with only move operations.

This should also be an alternative way of addressing issue #508
2015-09-27 10:53:22 -04:00
Zorg 32591954bc Add SUFileManager tests and fix issues along the way
* Fix uid / gid not being applied to the root path or non-directory inputs
* Remove the code that released quarantines using the NSURL way.
  It turned out not to be very reliable and didn't pass the tests.
  More explanation is given in the code.
* Prefix private methods with _ and expose some of them to the tests
2015-09-26 14:28:53 -04:00