mirror of
https://github.com/beetbox/beets.git
synced 2025-12-27 11:02:43 +01:00
Merge pull request #60 from mk-fg/dont_update_mtime_for_different_path
library: don't set/update item mtime if read-path is passed to read()
This commit is contained in:
commit
b58e0ed7fc
1 changed files with 2 additions and 1 deletions
|
|
@ -283,12 +283,13 @@ class Item(object):
|
|||
|
||||
for key in ITEM_KEYS_META:
|
||||
setattr(self, key, getattr(f, key))
|
||||
self.path = read_path
|
||||
|
||||
# Database's mtime should now reflect the on-disk value.
|
||||
if read_path == self.path:
|
||||
self.mtime = self.current_mtime()
|
||||
|
||||
self.path = read_path
|
||||
|
||||
def write(self):
|
||||
"""Writes the item's metadata to the associated file.
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue