mirror of
https://github.com/ciromattia/kcc
synced 2025-12-21 13:41:44 +00:00
ignore ._ files for real
This commit is contained in:
@@ -836,6 +836,10 @@ def sanitizePermissions(filetree):
|
|||||||
os.chmod(os.path.join(root, name), S_IWRITE | S_IREAD)
|
os.chmod(os.path.join(root, name), S_IWRITE | S_IREAD)
|
||||||
for name in dirs:
|
for name in dirs:
|
||||||
os.chmod(os.path.join(root, name), S_IWRITE | S_IREAD | S_IEXEC)
|
os.chmod(os.path.join(root, name), S_IWRITE | S_IREAD | S_IEXEC)
|
||||||
|
for root, dirs, files in os.walk(filetree, False):
|
||||||
|
for name in files:
|
||||||
|
if name.startswith('._'):
|
||||||
|
os.remove(os.path.join(root, name))
|
||||||
|
|
||||||
|
|
||||||
def chunk_directory(path):
|
def chunk_directory(path):
|
||||||
@@ -940,7 +944,8 @@ def detectSuboptimalProcessing(tmppath, orgpath):
|
|||||||
raise RuntimeError('Image file %s is corrupted. Error: %s' % (pathOrg, str(err)))
|
raise RuntimeError('Image file %s is corrupted. Error: %s' % (pathOrg, str(err)))
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
os.remove(os.path.join(root, name))
|
if os.path.exists(os.path.join(root, name)):
|
||||||
|
os.remove(os.path.join(root, name))
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
raise RuntimeError(f"{name}: {e}")
|
raise RuntimeError(f"{name}: {e}")
|
||||||
# remove empty nested folders
|
# remove empty nested folders
|
||||||
|
|||||||
Reference in New Issue
Block a user