mirror of
https://github.com/RsyncProject/rsync.git
synced 2026-10-20 21:04:15 -04:00
Fixed a sorting problem when an entry has an empty (but not NULL)
dirname (which I had thought impossible, but it appears to occur with --relative in some instances).
This commit is contained in:
1 parent
4ce48a5bfd
commit
080ddf58ae
1 file changed
+6
@@ -1517,11 +1517,17 @@ int f_name_cmp(struct file_struct *f1, struct file_struct *f2)
|
||||
if (!(c1 = (uchar*)f1->dirname)) {
|
||||
state1 = fnc_BASE;
|
||||
c1 = (uchar*)f1->basename;
|
||||
} else if (!*c1) {
|
||||
state1 = fnc_SLASH;
|
||||
c1 = (uchar*)"/";
|
||||
} else
|
||||
state1 = fnc_DIR;
|
||||
if (!(c2 = (uchar*)f2->dirname)) {
|
||||
state2 = fnc_BASE;
|
||||
c2 = (uchar*)f2->basename;
|
||||
} else if (!*c2) {
|
||||
state2 = fnc_SLASH;
|
||||
c2 = (uchar*)"/";
|
||||
} else
|
||||
state2 = fnc_DIR;
|
||||
|
||||
|
||||
Reference in new issue
Block a user