Commit 17c5eb9f authored by bescoto's avatar bescoto

Fix for user/group error. Problem was scoping of '%' vs 'or'!


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@549 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 4355bf04
......@@ -19,6 +19,8 @@ Fixed bug which could cause crash when backing up 3 or more hard
linked files and the first gets deleted during processing. (Thanks to
Dean Gaudet for bug report.)
Fixed user/group restoring error noticed by Fran Firman.
New in v0.13.4 (2004/01/31)
---------------------------
......
......@@ -138,9 +138,9 @@ def RORP2Record(rorpath):
# Add user, group, and permission information
uid, gid = rorpath.getuidgid()
str_list.append(" Uid %s\n" % uid)
str_list.append(" Uname %s\n" % rorpath.getuname() or ":")
str_list.append(" Uname %s\n" % (rorpath.getuname() or ":"))
str_list.append(" Gid %s\n" % gid)
str_list.append(" Gname %s\n" % rorpath.getgname() or ":")
str_list.append(" Gname %s\n" % (rorpath.getgname() or ":"))
str_list.append(" Permissions %s\n" % rorpath.getperms())
return "".join(str_list)
......@@ -177,10 +177,10 @@ def Record2RORP(record_string):
elif field == "Uid": data_dict['uid'] = int(data)
elif field == "Gid": data_dict['gid'] = int(data)
elif field == "Uname":
if data == ":": data_dict['uname'] = None
if data == ":" or data == 'None': data_dict['uname'] = None
else: data_dict['uname'] = data
elif field == "Gname":
if data == ':': data_dict['gname'] = None
if data == ':' or data == 'None': data_dict['gname'] = None
else: data_dict['gname'] = data
elif field == "Permissions": data_dict['perms'] = int(data)
else: raise ParsingError("Unknown field in line '%s %s'" %
......
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