mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-21 15:36:33 -05:00
Doesn't use inodes in dirent in Windows.
This commit is contained in:
parent
8ea5ed3230
commit
5afd4421ce
3 changed files with 3 additions and 4 deletions
1
mingw.c
1
mingw.c
|
|
@ -548,7 +548,6 @@ static void windows_finddata2dirent(const WIN32_FIND_DATAW* info, struct windows
|
|||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
dirent->d_ino = 0;
|
||||
memcpy(dirent->d_name, name, len + 1);
|
||||
|
||||
/* Store the HIDDEN attribute in a separate field */
|
||||
|
|
|
|||
2
mingw.h
2
mingw.h
|
|
@ -72,6 +72,7 @@
|
|||
#define O_NOFOLLOW 0
|
||||
#define dirent_hidden windows_dirent_hidden
|
||||
#define HAVE_STRUCT_DIRENT_D_STAT 1
|
||||
#undef HAVE_STRUCT_DIRENT_D_INO
|
||||
#define dirent_lstat windows_dirent_lstat
|
||||
#define stat_desc windows_stat_desc
|
||||
#undef sleep
|
||||
|
|
@ -226,7 +227,6 @@ int windows_open(const char* file, int flags, ...);
|
|||
struct windows_dirent {
|
||||
char d_name[PATH_MAX];
|
||||
int d_hidden;
|
||||
uint64_t d_ino; /**< Not significative. Always 0. */
|
||||
WIN32_FIND_DATAW d_data;
|
||||
};
|
||||
|
||||
|
|
|
|||
4
scan.c
4
scan.c
|
|
@ -685,7 +685,7 @@ struct dirent_sorted {
|
|||
char d_name[1]; /**< Variable length name. It must be the last field. */
|
||||
};
|
||||
|
||||
#ifndef _WIN32 /* In Windows doesn't sort */
|
||||
#if HAVE_STRUCT_DIRENT_D_INO
|
||||
static int dd_ino_compare(const void* void_a, const void* void_b)
|
||||
{
|
||||
const struct dirent_sorted* a = void_a;
|
||||
|
|
@ -817,7 +817,7 @@ static int scan_dir(struct snapraid_scan* scan, struct snapraid_state* state, in
|
|||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
#ifndef _WIN32 /* In Windows doesn't sort. The inode is not significative */
|
||||
#if HAVE_STRUCT_DIRENT_D_INO
|
||||
/* if inodes are persistent */
|
||||
if (!disk->has_not_persistent_inodes) {
|
||||
/* sort the list of dir entries by inodes */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue