struct _ntfs_volume *vol;
};
#endif
- struct {
- /* Normal apply only (UNIX) */
- unsigned long num_utime_warnings;
- };
-
+ #ifdef __WIN32__
struct {
/* Normal apply only (Win32) */
unsigned long num_set_sacl_priv_notheld;
unsigned long num_set_sd_access_denied;
unsigned vol_flags;
+ unsigned long num_hard_links_failed;
bool have_vol_flags;
};
+ #else
+ struct {
+ /* Normal apply only (UNIX) */
+ unsigned long num_utime_warnings;
+ };
+ #endif
};
};
#define MAX_GET_SD_ACCESS_DENIED_WARNINGS 1
#define MAX_GET_SACL_PRIV_NOTHELD_WARNINGS 1
+#define MAX_CREATE_HARD_LINK_WARNINGS 5
struct win32_capture_state {
unsigned long num_get_sd_access_denied;
unsigned long num_get_sacl_priv_notheld;
win32_error(err);
return WIMLIB_ERR_LINK;
} else {
- WARNING("Can't create hard link \"%ls => %ls\":\n"
- " Volume does not support hard links!\n"
- " Falling back to extracting a copy of the file.",
- output_path, inode->i_extracted_file);
+ args->num_hard_links_failed++;
+ if (args->num_hard_links_failed < MAX_CREATE_HARD_LINK_WARNINGS) {
+ WARNING("Can't create hard link \"%ls => %ls\":\n"
+ " Volume does not support hard links!\n"
+ " Falling back to extracting a copy of the file.",
+ output_path, inode->i_extracted_file);
+ } else if (args->num_hard_links_failed == MAX_CREATE_HARD_LINK_WARNINGS) {
+ WARNING("Suppressing further hard linking warnings...");
+ }
}
}