When patching, close base file before renaming
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Duplicity |
Fix Released
|
Medium
|
Unassigned |
Bug Description
This code in path.py doesn't close "self" before attempting to rename temp_path to self:
def patch_with_
"""Patch self with diff and then copy attributes over"""
assert self.isreg() and diff_ropath.isreg()
temp_path = self.get_
On a NetApp mounted over a CIFS connection, this fails. The following closes the file handles, and works fine:
def patch_with_
"""Patch self with diff and then copy attributes over"""
assert self.isreg() and diff_ropath.isreg()
temp_path = self.get_
fbase = self.open("rb")
fdiff = diff_ropath.
assert not fbase.close()
assert not fdiff.close()
Note that this opened file handle is the root cause for bug 1448249. So fixing this one fixes that one too, at least on my system.
Changed in duplicity: | |
importance: | Undecided → Medium |
milestone: | none → 0.7.03 |
status: | New → Fix Committed |
Changed in duplicity: | |
status: | Fix Committed → Fix Released |