Skip to content

Fixed file's groupOwnerName in attributesOfItem() #885

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 20, 2017
Merged

Fixed file's groupOwnerName in attributesOfItem() #885

merged 2 commits into from
Feb 20, 2017

Conversation

amosavian
Copy link
Contributor

@amosavian amosavian commented Feb 17, 2017

Fixed group owner name assigned to .groupOwnerAccountID instead of .groupOwnerAccountName in FileManager.attributesOfItem(atPath:)

Fixed group owner name assigned to `.groupOwnerID` instead of `.groupOwnerName`
@parkera
Copy link
Contributor

parkera commented Feb 17, 2017

Looks correct. Do we have a test case?

@amosavian
Copy link
Contributor Author

@parkera I didn't check, I just saw that incidentally. But this is test case:

https://github.com/apple/swift-corelibs-foundation/blob/master/TestFoundation/TestNSFileManager.swift#L117-L163

There is one for .ownerAccountID, but the rest are orphan.

@parkera
Copy link
Contributor

parkera commented Feb 20, 2017

Could you add a line to that test case that verifies that the name is set?

I know this fix seems trivial but I want to keep expanding our test cases so we don't have a chance of re-introducing a regression.

Added FileAttributeKey.ownerAccountName & FileAttributeKey.groupOwnerAccountName result tests
@amosavian
Copy link
Contributor Author

@parkera Added. This checks mentioned attributes are String if they are returned (aka when file system supports), and checks not to be empty strings.

@parkera
Copy link
Contributor

parkera commented Feb 20, 2017

Great, thanks.

@parkera
Copy link
Contributor

parkera commented Feb 20, 2017

@swift-ci please test and merge

@swift-ci swift-ci merged commit 0cbb322 into swiftlang:master Feb 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants