You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The macOS one is correct, the Linux version isn't actually a path operation, it just happens to be buggy using a binary search and the middle character it selects is the `p` or `tmp` so appears to give the correct answer.
#1668 should be a fix for `commonPrefix(with:options🙂` on Linux.
A possible solution to finding the common directory path is:
Attachment: Download
Environment
Linux (Ubuntu)
OSx
Swift 3
Additional Detail from JIRA
md5: c772f932a7dfd065482ae48ac08a6218
Issue Description:
While working in a small routine for finding a common directory path, the same function generated distinct results when run in OSx (as opposed to Linux, my system). The SO question that revealed this issue is [here|https://codereview.stackexchange.com/questions/174705/find-common-directory-path/174728#174728.]
The code:
Will generate the correct answer in Linux:
But a wrong result in OSx:
Screenshots of the two results can be found in the SO discussion in the link above.
The text was updated successfully, but these errors were encountered: