if (l1 > 0) flags |= SAME_NAME;
if (l2 > 255) flags |= LONG_NAME;
+ /* we must make sure we don't send a zero flags byte or the other
+ end will terminate the flist transfer */
+ if (flags == 0 && !S_ISDIR(file->mode)) flags |= FLAG_DELETE;
+ if (flags == 0) flags |= LONG_NAME;
+
write_byte(f,flags);
if (flags & SAME_NAME)
write_byte(f,l1);
}
}
-/* read from the file descriptor handing multiplexing -
+/* read from the file descriptor handling multiplexing -
return number of bytes read
never return <= 0 */
static int read_unbuffered(int fd, char *buf, int len)