Skip to content

Commit

Permalink
Remove code that attempted to manage xattrs out of output file
Browse files Browse the repository at this point in the history
Feature requested in issue #1179, but caused #1195. On further review,
there is no platform independent way to manage extended attributes
and it is not clear copying them through is necessarily the sensible
thing to do.

Closes #1179.
  • Loading branch information
jbarlow83 committed Nov 30, 2023
1 parent c90d5cd commit 2affa83
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/ocrmypdf/_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -992,10 +992,3 @@ def copy_final(
# get the appropriate umask, ownership, etc.
with open(output_file, 'w+b') as output_stream:
copyfileobj(input_stream, output_stream)
# Attempt to copy file attributes from input to output
if original_file:
with suppress(OSError):
# Copy original file's permissions, ownership, etc. if possible
copystat(original_file, output_file)
# Set output file's modification time to now
Path(output_file).touch(exist_ok=True)

0 comments on commit 2affa83

Please sign in to comment.