Skip to content

Commit

Permalink
Merge pull request #15 from YakDriver/nomapping
Browse files Browse the repository at this point in the history
Fix account lookup issue
  • Loading branch information
YakDriver authored Apr 20, 2020
2 parents 5ca96d3 + 1953f8f commit 4a38cc9
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.2.0
current_version = 0.2.1
commit = False
tag = False
tag_name = {new_version}
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
## Changelog

### 0.2.1

**Commit Delta**: [Change from 0.2.0 release](https://github.com/YakDriver/oschmod/compare/0.2.0...0.2.1)

**Released**: 2020.04.20

**Summary**:

* Fix issue with account lookup failing with error (`No mapping between account names and security IDs was done.`).

### 0.2.0

**Commit Delta**: [Change from 0.1.5 release](https://github.com/YakDriver/oschmod/compare/0.1.5...0.2.0)
Expand Down
4 changes: 2 additions & 2 deletions oschmod/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
"S_IXOTH"
)

__version__ = "0.2.0"
__version__ = "0.2.1"


def get_mode(path):
Expand Down Expand Up @@ -349,7 +349,7 @@ def _win_set_permissions(path, mode, object_type):
system_ace = None
for _ in range(0, dacl.GetAceCount()):
ace = dacl.GetAce(0)
if win32security.LookupAccountSid(
if ace[2] and ace[2].IsValid() and win32security.LookupAccountSid(
None, ace[2]) == SECURITY_NT_AUTHORITY:
system_ace = ace
dacl.DeleteAce(0)
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = oschmod
description = Windows and Linux compatible chmod
long_description = file: README.md, CHANGELOG.md
long_description_content_type = text/markdown
version = 0.2.0
version = 0.2.1
author = YakDriver
author_email = [email protected]
url = https://github.com/yakdriver/oschmod
Expand Down

0 comments on commit 4a38cc9

Please sign in to comment.