mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-07 23:35:22 +01:00
consumer.py: read create_date from original file (instead of temp copy)
In line 328, `self.path` is set to a fresh written copy of the source file. This copy has a different timestamp (=now). When using the source file's timestamp as `create_date`, it makes much more sense to ask for the timestamp from `self.original_path`
This commit is contained in:
parent
c1641f6fb8
commit
3ab2892066
1 changed files with 1 additions and 1 deletions
|
|
@ -530,7 +530,7 @@ class Consumer(LoggingMixin):
|
||||||
create_date = date
|
create_date = date
|
||||||
self.log.debug(f"Creation date from parse_date: {create_date}")
|
self.log.debug(f"Creation date from parse_date: {create_date}")
|
||||||
else:
|
else:
|
||||||
stats = os.stat(self.path)
|
stats = os.stat(self.original_path)
|
||||||
create_date = timezone.make_aware(
|
create_date = timezone.make_aware(
|
||||||
datetime.datetime.fromtimestamp(stats.st_mtime),
|
datetime.datetime.fromtimestamp(stats.st_mtime),
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue