diff -Nru jdupes-1.19.0/act_linkfiles.c jdupes-1.19.1/act_linkfiles.c --- jdupes-1.19.0/act_linkfiles.c 2020-10-11 14:56:48.000000000 +0000 +++ jdupes-1.19.1/act_linkfiles.c 2020-11-28 16:15:03.000000000 +0000 @@ -276,7 +276,7 @@ break; default: case 1: /* hardlink */ - printf("---->"); + printf("----> "); break; #ifdef ENABLE_CLONEFILE_LINK case 2: /* clonefile */ diff -Nru jdupes-1.19.0/CHANGES jdupes-1.19.1/CHANGES --- jdupes-1.19.0/CHANGES 2020-10-11 14:56:48.000000000 +0000 +++ jdupes-1.19.1/CHANGES 2020-11-28 16:15:03.000000000 +0000 @@ -1,7 +1,13 @@ +jdupes 1.19.1 + +- Fix missing space in ----> hard link inidcator +- Fix -P/--print and -p/--permissions options +- Remove temporary warning when using -X + jdupes 1.19.0 - Make -X size[+-=] an inclusion filter instead (CHECK YOUR SHELL SCRIPTS) -- Fix -X noext/only extension matching bugs +- Fix -X noext/onlyext extension matching bugs - Remove deprecated -x/--xsize option and some undocumented redundant options - Preserve metadata when doing -B/--dedupe on Apple APFS - Name sorting is now case-insensitive diff -Nru jdupes-1.19.0/debian/changelog jdupes-1.19.1/debian/changelog --- jdupes-1.19.0/debian/changelog 2020-10-13 03:09:03.000000000 +0000 +++ jdupes-1.19.1/debian/changelog 2020-12-01 00:20:13.000000000 +0000 @@ -1,3 +1,13 @@ +jdupes (1.19.1-1) unstable; urgency=medium + + * New upstream version 1.19.1. + * debian/control: bumped Standards-Version to 4.5.1. + * debian/tests/control: + - Added a new test based in package forensics-samples-files. + - Removed option -T from a test. + + -- Joao Eriberto Mota Filho Mon, 30 Nov 2020 21:20:13 -0300 + jdupes (1.19.0-1) unstable; urgency=medium * New upstream version 1.19.0. diff -Nru jdupes-1.19.0/debian/control jdupes-1.19.1/debian/control --- jdupes-1.19.0/debian/control 2020-10-13 02:55:29.000000000 +0000 +++ jdupes-1.19.1/debian/control 2020-12-01 00:20:13.000000000 +0000 @@ -3,7 +3,7 @@ Priority: optional Maintainer: Joao Eriberto Mota Filho Build-Depends: debhelper-compat (= 13) -Standards-Version: 4.5.0 +Standards-Version: 4.5.1 Rules-Requires-Root: no Homepage: https://github.com/jbruchon/jdupes Vcs-Browser: https://salsa.debian.org/debian/jdupes diff -Nru jdupes-1.19.0/debian/tests/control jdupes-1.19.1/debian/tests/control --- jdupes-1.19.0/debian/tests/control 2020-10-13 03:09:03.000000000 +0000 +++ jdupes-1.19.1/debian/tests/control 2020-12-01 00:20:13.000000000 +0000 @@ -17,7 +17,7 @@ Test-Command: jdupes -r testdir Test-Command: cp -a debian/tests/files/ $AUTOPKGTEST_TMP; - jdupes -@1ADHinprlsT $AUTOPKGTEST_TMP/files; + jdupes -@1ADHinprls $AUTOPKGTEST_TMP/files; tree -C $AUTOPKGTEST_TMP/ Depends: @, tree:native @@ -26,3 +26,8 @@ tree -C $AUTOPKGTEST_TMP/ Depends: @, tree:native Restrictions: allow-stderr + +Test-Command: fsdeploy original-files; + jdupes -r $AUTOPKGTEST_TMP/ +Restrictions: allow-stderr +Depends: @, forensics-samples-files diff -Nru jdupes-1.19.0/jdupes.c jdupes-1.19.1/jdupes.c --- jdupes-1.19.0/jdupes.c 2020-10-11 14:56:48.000000000 +0000 +++ jdupes-1.19.1/jdupes.c 2020-11-28 16:15:03.000000000 +0000 @@ -540,17 +540,6 @@ /* Invoke help text if requested */ if (strcasecmp(option, "help") == 0) { help_text_extfilter(); exit(EXIT_SUCCESS); } - /* FIXME: v1.19.0 warning that -X meanings have changed - remove after v1.19.0 */ - static int stupid_warning = 1; - if (stupid_warning) { - fprintf(stderr, "\n==============================================================\n"); - fprintf(stderr, "| WARNING: -X/--extfilter meanings have changed in v1.19.0! |\n"); - fprintf(stderr, "| Run `jdupes -X help` and read very carefully! |\n"); - fprintf(stderr, "| This warning will be removed in the next release. |\n"); - fprintf(stderr, "==============================================================\n\n"); - stupid_warning = 0; - } - opt = string_malloc(strlen(option) + 1); if (opt == NULL) oom("add_extfilter option"); strcpy(opt, option); @@ -853,6 +842,7 @@ /* De-allocate the travdone tree */ static void travdone_free(struct travdone * const restrict cur) { + LOUD(fprintf(stderr, "travdone_free(%p)\n", cur);) if (cur == NULL) return; if (cur->left != NULL) travdone_free(cur->left); if (cur->right != NULL) travdone_free(cur->right); @@ -1810,7 +1800,7 @@ { "noempty", 0, 0, 'n' }, { "paramorder", 0, 0, 'O' }, { "order", 1, 0, 'o' }, - { "print", 0, 0, 'P' }, + { "print", 1, 0, 'P' }, { "permissions", 0, 0, 'p' }, { "quick", 0, 0, 'Q' }, { "quiet", 0, 0, 'q' }, @@ -1833,7 +1823,7 @@ #define GETOPT getopt #endif -#define GETOPT_STRING "@01ABC:DdfHhIijKLlMmNnOo:Pp:QqRrSsTtUuVvX:Zz" +#define GETOPT_STRING "@01ABC:DdfHhIijKLlMmNnOo:P:pQqRrSsTtUuVvX:Zz" /* Windows buffers our stderr output; don't let it do that */ #ifdef ON_WINDOWS @@ -1981,6 +1971,7 @@ LOUD(fprintf(stderr, "opt: permissions must also match (--permissions)\n");) break; case 'P': + LOUD(fprintf(stderr, "opt: print early: '%s' (--print)\n", optarg);) if (strcmp(optarg, "partial") == 0) SETFLAG(p_flags, PF_PARTIAL); else if (strcmp(optarg, "early") == 0) SETFLAG(p_flags, PF_EARLYMATCH); else if (strcmp(optarg, "fullhash") == 0) SETFLAG(p_flags, PF_FULLHASH); diff -Nru jdupes-1.19.0/jody_win_unicode.c jdupes-1.19.1/jody_win_unicode.c --- jdupes-1.19.0/jody_win_unicode.c 2020-10-11 14:56:48.000000000 +0000 +++ jdupes-1.19.1/jody_win_unicode.c 2020-11-28 16:15:03.000000000 +0000 @@ -20,9 +20,6 @@ #ifndef PATHBUF_SIZE #define PATHBUF_SIZE 8196 #endif -#define WPATH_MAX 8192 - #define M2W(a,b) MultiByteToWideChar(CP_UTF8, 0, a, -1, (LPWSTR)b, WPATH_MAX) - #define W2M(a,b) WideCharToMultiByte(CP_UTF8, 0, a, -1, (LPSTR)b, WPATH_MAX, NULL, NULL) static wchar_t wstr[PATHBUF_SIZE]; /* Convert slashes to backslashes in a file path */ diff -Nru jdupes-1.19.0/jody_win_unicode.h jdupes-1.19.1/jody_win_unicode.h --- jdupes-1.19.0/jody_win_unicode.h 2020-10-11 14:56:48.000000000 +0000 +++ jdupes-1.19.1/jody_win_unicode.h 2020-11-28 16:15:03.000000000 +0000 @@ -13,8 +13,17 @@ extern int fwprint(FILE * const restrict stream, const char * const restrict str, const int cr); #ifdef UNICODE -extern void slash_convert(char *path); -extern void widearg_to_argv(int argc, wchar_t **wargv, char **argv); + #ifndef WPATH_MAX + #define WPATH_MAX 8192 + #endif + #ifndef M2W + #define M2W(a,b) MultiByteToWideChar(CP_UTF8, 0, a, -1, (LPWSTR)b, WPATH_MAX) + #endif + #ifndef W2M + #define W2M(a,b) WideCharToMultiByte(CP_UTF8, 0, a, -1, (LPSTR)b, WPATH_MAX, NULL, NULL) + #endif + extern void slash_convert(char *path); + extern void widearg_to_argv(int argc, wchar_t **wargv, char **argv); #else #define slash_convert(a) #endif /* UNICODE */ diff -Nru jdupes-1.19.0/string_malloc.c jdupes-1.19.1/string_malloc.c --- jdupes-1.19.0/string_malloc.c 2020-10-11 14:56:48.000000000 +0000 +++ jdupes-1.19.1/string_malloc.c 2020-11-28 16:15:03.000000000 +0000 @@ -6,6 +6,7 @@ * Released under The MIT License */ +#include #include #include #include "string_malloc.h" @@ -98,6 +99,7 @@ /* Return smallest object found and delete from free list */ if (min_i != -1) { min_p = sma_freelist[min_i].addr; + *min_p = sma_freelist[min_i].size; sma_freelist[min_i].addr = NULL; sma_freelist_cnt--; min_p++; @@ -224,6 +226,11 @@ /* Get address to real start of object and the object size */ sizeptr = (size_t *)addr - 1; size = *(size_t *)sizeptr; + if (size == 0) goto sf_double_free; + + /* Mark the freed object to catch double free attempts */ + *(size_t *)sizeptr = 0; + /* Calculate after-block pointer for merge checks */ after = (uintptr_t)addr + size; @@ -272,6 +279,10 @@ sf_failed: DBG(sma_free_ignored++;) return; + +sf_double_free: + fprintf(stderr, "string_malloc: ERROR: attempt to string_free() already freed object at %p\n", addr); + return; } /* Destroy all allocated pages */ diff -Nru jdupes-1.19.0/version.h jdupes-1.19.1/version.h --- jdupes-1.19.0/version.h 2020-10-11 14:56:48.000000000 +0000 +++ jdupes-1.19.1/version.h 2020-11-28 16:15:03.000000000 +0000 @@ -4,7 +4,7 @@ #ifndef JDUPES_VERSION_H #define JDUPES_VERSION_H -#define VER "1.19.0" -#define VERDATE "2020-10-11" +#define VER "1.19.1" +#define VERDATE "2020-11-28" #endif /* JDUPES_VERSION_H */ diff -Nru jdupes-1.19.0/winres.manifest.xml jdupes-1.19.1/winres.manifest.xml --- jdupes-1.19.0/winres.manifest.xml 2020-10-11 14:56:48.000000000 +0000 +++ jdupes-1.19.1/winres.manifest.xml 2020-11-28 16:15:03.000000000 +0000 @@ -1,6 +1,6 @@ - + true diff -Nru jdupes-1.19.0/winres.rc jdupes-1.19.1/winres.rc --- jdupes-1.19.0/winres.rc 2020-10-11 14:56:48.000000000 +0000 +++ jdupes-1.19.1/winres.rc 2020-11-28 16:15:03.000000000 +0000 @@ -3,8 +3,8 @@ 1 24 winres.manifest.xml VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,18,2,0 - PRODUCTVERSION 1,18,2,0 + FILEVERSION 1,19,0,0 + PRODUCTVERSION 1,19,0,0 FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x40004L @@ -18,12 +18,12 @@ VALUE "Comments", "(C) 2015-2020 Jody Bruchon and contributors, published under The MIT License" VALUE "CompanyName", "Jody Bruchon" VALUE "FileDescription", "jdupes Duplicate File Finder Tool" - VALUE "FileVersion", "1,18,2,0" + VALUE "FileVersion", "1,19,0,0" VALUE "InternalName", "jdupes" VALUE "LegalCopyright", "(C) 2015-2020 Jody Bruchon and contributors" VALUE "OriginalFilename", "jdupes.exe" VALUE "ProductName", "jdupes" - VALUE "ProductVersion", "1,18,2,0" + VALUE "ProductVersion", "1,19,0,0" END END BLOCK "VarFileInfo" diff -Nru jdupes-1.19.0/winres_xp.rc jdupes-1.19.1/winres_xp.rc --- jdupes-1.19.0/winres_xp.rc 2020-10-11 14:56:48.000000000 +0000 +++ jdupes-1.19.1/winres_xp.rc 2020-11-28 16:15:03.000000000 +0000 @@ -1,8 +1,8 @@ #include "winver.h" VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,18,2,0 - PRODUCTVERSION 1,18,2,0 + FILEVERSION 1,19,0,0 + PRODUCTVERSION 1,19,0,0 FILEFLAGSMASK 0x3fL FILEFLAGS 0x0L FILEOS 0x40004L @@ -16,12 +16,12 @@ VALUE "Comments", "(C) 2015-2020 Jody Bruchon and contributors, published under The MIT License" VALUE "CompanyName", "Jody Bruchon" VALUE "FileDescription", "jdupes Duplicate File Finder Tool" - VALUE "FileVersion", "1,18,2,0" + VALUE "FileVersion", "1,19,0,0" VALUE "InternalName", "jdupes" VALUE "LegalCopyright", "(C) 2015-2020 Jody Bruchon and contributors" VALUE "OriginalFilename", "jdupes.exe" VALUE "ProductName", "jdupes" - VALUE "ProductVersion", "1,18,2,0" + VALUE "ProductVersion", "1,19,0,0" END END BLOCK "VarFileInfo" diff -Nru jdupes-1.19.0/win_stat.c jdupes-1.19.1/win_stat.c --- jdupes-1.19.0/win_stat.c 2020-10-11 14:56:48.000000000 +0000 +++ jdupes-1.19.1/win_stat.c 2020-11-28 16:15:03.000000000 +0000 @@ -13,9 +13,6 @@ #include "win_stat.h" #include -#define WPATH_MAX 8192 -#define M2W(a,b) MultiByteToWideChar(CP_UTF8, 0, a, -1, (LPWSTR)b, WPATH_MAX) - /* Convert NT epoch to UNIX epoch */ static time_t nttime_to_unixtime(const uint64_t * const restrict timestamp) { diff -Nru jdupes-1.19.0/win_stat.h jdupes-1.19.1/win_stat.h --- jdupes-1.19.0/win_stat.h 2020-10-11 14:56:48.000000000 +0000 +++ jdupes-1.19.1/win_stat.h 2020-11-28 16:15:03.000000000 +0000 @@ -38,6 +38,13 @@ #define S_ISTEMP(st_mode) ((st_mode & FILE_ATTRIBUTE_TEMPORARY) ? 1 : 0) #define S_ISREG(st_mode) ((st_mode & FILE_ATTRIBUTE_DIRECTORY) ? 0 : 1) +#ifndef WPATH_MAX + #define WPATH_MAX 8192 +#endif +#ifndef M2W + #define M2W(a,b) MultiByteToWideChar(CP_UTF8, 0, a, -1, (LPWSTR)b, WPATH_MAX) +#endif + extern int win_stat(const char * const filename, struct winstat * const restrict buf); #ifdef __cplusplus