kkpyutil 1.49.1__tar.gz → 1.49.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {kkpyutil-1.49.1 → kkpyutil-1.49.3}/PKG-INFO +1 -1
- {kkpyutil-1.49.1 → kkpyutil-1.49.3}/kkpyutil.py +7 -1
- {kkpyutil-1.49.1 → kkpyutil-1.49.3}/pyproject.toml +1 -1
- {kkpyutil-1.49.1 → kkpyutil-1.49.3}/LICENSE +0 -0
- {kkpyutil-1.49.1 → kkpyutil-1.49.3}/README.md +0 -0
- {kkpyutil-1.49.1 → kkpyutil-1.49.3}/kkpyutil_helper/windows/kkttssave.ps1 +0 -0
- {kkpyutil-1.49.1 → kkpyutil-1.49.3}/kkpyutil_helper/windows/kkttsspeak.ps1 +0 -0
|
@@ -2140,7 +2140,6 @@ def sync_dirs(src_root, dst_root, logger=glogger, sudo=False):
|
|
|
2140
2140
|
# Note: 'staff' is the default group for users on macOS
|
|
2141
2141
|
cmd = [
|
|
2142
2142
|
'rsync', '-av', '--inplace',
|
|
2143
|
-
f'--chown={user}:staff',
|
|
2144
2143
|
osp.join(src_root, ''), # Trailing slash copies contents
|
|
2145
2144
|
dst_root
|
|
2146
2145
|
]
|
|
@@ -2148,6 +2147,13 @@ def sync_dirs(src_root, dst_root, logger=glogger, sudo=False):
|
|
|
2148
2147
|
if not _run_sudo_command(cmd, pwd, logger):
|
|
2149
2148
|
logger.error(f'Sync failed with command: {cmd}; you may have entered wrong password')
|
|
2150
2149
|
return False
|
|
2150
|
+
# 3. Step Two: Fix Ownership
|
|
2151
|
+
# -R is recursive. We set it to the user and the 'staff' group.
|
|
2152
|
+
chown_cmd = ['chown', '-R', f'{user}:staff', dst_root]
|
|
2153
|
+
logger.info(f"Setting ownership of {dst_root} to {user}...")
|
|
2154
|
+
if not _run_sudo_command(chown_cmd, pwd, logger):
|
|
2155
|
+
logger.error("Failed to set ownership.")
|
|
2156
|
+
return False
|
|
2151
2157
|
return True
|
|
2152
2158
|
|
|
2153
2159
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|