zeromq / czmq

High-level C binding for ØMQ
czmq.zeromq.org
Mozilla Public License 2.0
1.18k stars 525 forks source link

Problem: zdir_flatten pushes subdirs at the end causing problems with patches computation in zdir_diff #2223

Closed stvales closed 2 years ago

stvales commented 2 years ago

Problem: zdir_flatten pushes subdirs at the end causing problems with patches computation in zdir_diff For example, when a file is added in the root directory and alphabetically placed between two subdirs, zdir_diff generates false create/delete patches for all the files in the subdirs.

Solution: sort the whole flat list generated by zdir_flatten after all recursions are over.

bluca commented 2 years ago
C:\projects\czmq\src\zdir.c(344): error C2440: '=': cannot convert from 'void *' to 'zfile_t *' [C:\projects\czmq\build\czmq.vcxproj]
  C:\projects\czmq\src\zdir.c(344): note: Conversion from 'void*' to pointer to non-'void' requires an explicit cast