Commit a118487a authored by owsla's avatar owsla

Inform the user of which file has failed if an exception occurs during a

rename operation.


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@954 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 308f9f4c
New in v1.2.3 (????/??/??)
---------------------------
Inform the user of which file has failed if an exception occurs during a
rename operation. (Andrew Ferguson)
New in v1.2.2 (2008/10/19)
......
......@@ -255,7 +255,10 @@ def rename(rp_source, rp_dest):
try:
rp_source.conn.os.rename(rp_source.path, rp_dest.path)
except OSError, error:
if error.errno != errno.EEXIST: raise
if error.errno != errno.EEXIST:
log.Log("OSError while renaming %s to %s"
% (rp_source.path, rp_dest.path), 1)
raise
# On Windows, files can't be renamed on top of an existing file
rp_source.conn.os.unlink(rp_dest.path)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment