NCP22/25 Create-Date/Create-Time/Creator-ID über xattr speichern buildfix
All checks were successful
Source release / source-package (push) Successful in 36s
All checks were successful
Source release / source-package (push) Successful in 36s
This commit is contained in:
@@ -1463,10 +1463,11 @@ static int get_file_attrib(NW_FILE_INFO *f, char *unixname, struct stat *stb,
|
||||
uint16 create_date = 0;
|
||||
uint8 meta_flags = 0;
|
||||
mars_nwe_get_file_info(unixname, &create_date, NULL, NULL, &meta_flags);
|
||||
if (meta_flags & MARS_NWE_FILEINFO_HAS_CREATE_DATE)
|
||||
if (meta_flags & MARS_NWE_FILEINFO_HAS_CREATE_DATE) {
|
||||
U16_TO_BE16(create_date, f->create_date);
|
||||
else
|
||||
} else {
|
||||
un_date_2_nw(stb->st_mtime, f->create_date, 1);
|
||||
}
|
||||
}
|
||||
un_date_2_nw(stb->st_atime, f->acces_date, 1);
|
||||
un_date_2_nw(stb->st_mtime, f->modify_date, 1);
|
||||
@@ -1497,18 +1498,21 @@ static int get_dir_attrib(NW_DIR_INFO *d, char *unixname, struct stat *stb,
|
||||
uint8 meta_flags = 0;
|
||||
mars_nwe_get_file_info(unixname, &create_date, &create_time,
|
||||
&creator_id, &meta_flags);
|
||||
if (meta_flags & MARS_NWE_FILEINFO_HAS_CREATE_DATE)
|
||||
if (meta_flags & MARS_NWE_FILEINFO_HAS_CREATE_DATE) {
|
||||
U16_TO_BE16(create_date, d->create_date);
|
||||
else
|
||||
} else {
|
||||
un_date_2_nw(stb->st_mtime, d->create_date, 1);
|
||||
if (meta_flags & MARS_NWE_FILEINFO_HAS_CREATE_TIME)
|
||||
}
|
||||
if (meta_flags & MARS_NWE_FILEINFO_HAS_CREATE_TIME) {
|
||||
U16_TO_BE16(create_time, d->create_time);
|
||||
else
|
||||
} else {
|
||||
un_time_2_nw(stb->st_mtime, d->create_time, 1);
|
||||
if (meta_flags & MARS_NWE_FILEINFO_HAS_CREATOR)
|
||||
}
|
||||
if (meta_flags & MARS_NWE_FILEINFO_HAS_CREATOR) {
|
||||
U32_TO_BE32(creator_id, d->owner_id);
|
||||
else
|
||||
} else {
|
||||
U32_TO_BE32(get_file_owner(stb), d->owner_id);
|
||||
}
|
||||
}
|
||||
d->access_right_mask = 0;
|
||||
d->reserved = 0;
|
||||
@@ -2993,18 +2997,21 @@ void get_dos_file_attrib(NW_DOS_FILE_INFO *f,
|
||||
uint8 meta_flags = 0;
|
||||
mars_nwe_get_file_info(unixname, &create_date, &create_time,
|
||||
&creator_id, &meta_flags);
|
||||
if (meta_flags & MARS_NWE_FILEINFO_HAS_CREATE_DATE)
|
||||
if (meta_flags & MARS_NWE_FILEINFO_HAS_CREATE_DATE) {
|
||||
U16_TO_16(create_date, f->created.date);
|
||||
else
|
||||
} else {
|
||||
un_date_2_nw(stb->st_mtime, f->created.date, 0);
|
||||
if (meta_flags & MARS_NWE_FILEINFO_HAS_CREATE_TIME)
|
||||
}
|
||||
if (meta_flags & MARS_NWE_FILEINFO_HAS_CREATE_TIME) {
|
||||
U16_TO_16(create_time, f->created.time);
|
||||
else
|
||||
} else {
|
||||
un_time_2_nw(stb->st_mtime, f->created.time, 0);
|
||||
if (meta_flags & MARS_NWE_FILEINFO_HAS_CREATOR)
|
||||
}
|
||||
if (meta_flags & MARS_NWE_FILEINFO_HAS_CREATOR) {
|
||||
U32_TO_BE32(creator_id, f->created.id);
|
||||
else
|
||||
} else {
|
||||
U32_TO_BE32(nw_owner, f->created.id);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
@@ -3049,18 +3056,21 @@ void get_dos_dir_attrib(NW_DOS_DIR_INFO *f,
|
||||
uint8 meta_flags = 0;
|
||||
mars_nwe_get_file_info(unixname, &create_date, &create_time,
|
||||
&creator_id, &meta_flags);
|
||||
if (meta_flags & MARS_NWE_FILEINFO_HAS_CREATE_DATE)
|
||||
if (meta_flags & MARS_NWE_FILEINFO_HAS_CREATE_DATE) {
|
||||
U16_TO_16(create_date, f->created.date);
|
||||
else
|
||||
} else {
|
||||
un_date_2_nw(stb->st_mtime, f->created.date, 0);
|
||||
if (meta_flags & MARS_NWE_FILEINFO_HAS_CREATE_TIME)
|
||||
}
|
||||
if (meta_flags & MARS_NWE_FILEINFO_HAS_CREATE_TIME) {
|
||||
U16_TO_16(create_time, f->created.time);
|
||||
else
|
||||
} else {
|
||||
un_time_2_nw(stb->st_mtime, f->created.time, 0);
|
||||
if (meta_flags & MARS_NWE_FILEINFO_HAS_CREATOR)
|
||||
}
|
||||
if (meta_flags & MARS_NWE_FILEINFO_HAS_CREATOR) {
|
||||
U32_TO_BE32(creator_id, f->created.id);
|
||||
else
|
||||
} else {
|
||||
U32_TO_BE32(get_file_owner(stb), f->created.id);
|
||||
}
|
||||
}
|
||||
{
|
||||
uint16 archive_date = 0;
|
||||
|
||||
@@ -1102,20 +1102,23 @@ static int build_dir_info(DIR_BASE_ENTRY *dbe,
|
||||
uint8 meta_flags = 0;
|
||||
mars_nwe_get_file_info(unixname, &create_date, &create_time,
|
||||
&creator_id, &meta_flags);
|
||||
if (meta_flags & MARS_NWE_FILEINFO_HAS_CREATE_TIME)
|
||||
if (meta_flags & MARS_NWE_FILEINFO_HAS_CREATE_TIME) {
|
||||
U16_TO_16(create_time, p);
|
||||
else
|
||||
} else {
|
||||
un_time_2_nw(stb->st_mtime, p, 0);
|
||||
}
|
||||
p +=2;
|
||||
if (meta_flags & MARS_NWE_FILEINFO_HAS_CREATE_DATE)
|
||||
if (meta_flags & MARS_NWE_FILEINFO_HAS_CREATE_DATE) {
|
||||
U16_TO_16(create_date, p);
|
||||
else
|
||||
} else {
|
||||
un_date_2_nw(stb->st_mtime, p, 0);
|
||||
}
|
||||
p +=2;
|
||||
if (meta_flags & MARS_NWE_FILEINFO_HAS_CREATOR)
|
||||
if (meta_flags & MARS_NWE_FILEINFO_HAS_CREATOR) {
|
||||
U32_TO_BE32(creator_id, p); /* HI-LOW ! */
|
||||
else
|
||||
} else {
|
||||
U32_TO_BE32(owner, p); /* HI-LOW ! */
|
||||
}
|
||||
p +=4;
|
||||
} else p+=8;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user