This commit is contained in:
@@ -126,6 +126,7 @@ static int last_dos_alias_volume = -1;
|
||||
static ino_t last_dos_alias_inode = 0;
|
||||
static uint8 last_dos_alias_parent[300];
|
||||
static uint8 last_dos_alias_real[256];
|
||||
static uint8 last_dos_alias_alias[14];
|
||||
|
||||
static void remember_dos_alias_source(int volume, uint8 *parent, uint8 *real,
|
||||
ino_t inode)
|
||||
@@ -136,8 +137,14 @@ static void remember_dos_alias_source(int volume, uint8 *parent, uint8 *real,
|
||||
sizeof(last_dos_alias_parent)-1);
|
||||
strmaxcpy(last_dos_alias_real, real ? (char*)real : "",
|
||||
sizeof(last_dos_alias_real)-1);
|
||||
last_dos_alias_alias[0] = '\0';
|
||||
if (parent && real) {
|
||||
build_dos_83_alias(get_volume_options(volume), parent, real, inode,
|
||||
last_dos_alias_alias, sizeof(last_dos_alias_alias));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static char *build_unix_name(NW_PATH *nwpath, int modus)
|
||||
/*
|
||||
* returns complete UNIX path
|
||||
@@ -740,6 +747,7 @@ static int get_dir_entry(NW_PATH *nwpath,
|
||||
*kpath = '\0';
|
||||
remember_dos_alias_source(volume, (uint8*)xkpath, name,
|
||||
statb->st_ino);
|
||||
XDPRINTF((1,0,"DOSGETDIR parent='%s' real='%s' alias='%s' inode=%ld", xkpath, name, dosalias, (long)statb->st_ino));
|
||||
xstrcpy(nwpath->fn, (char*)dosalias);
|
||||
XDPRINTF((5,0,"FOUND=:%s: attrib=0x%x", nwpath->fn, statb->st_mode));
|
||||
break; /* ready */
|
||||
@@ -854,6 +862,7 @@ static int get_dh_entry(DIR_HANDLE *dh,
|
||||
*(dh->kpath) = '\0';
|
||||
remember_dos_alias_source(dh->volume, (uint8*)dh->unixname,
|
||||
name, statb->st_ino);
|
||||
XDPRINTF((1,0,"DOSDH parent='%s' real='%s' alias='%s' inode=%ld", dh->unixname, name, dosalias, (long)statb->st_ino));
|
||||
strmaxcpy((char*)search, (char*)dosalias, size_search-1);
|
||||
break; /* ready */
|
||||
}
|
||||
@@ -2542,8 +2551,13 @@ static void build_dos_attr_name(int volume, uint8 *path, char *unixname,
|
||||
if (stb && volume == last_dos_alias_volume
|
||||
&& stb->st_ino == last_dos_alias_inode
|
||||
&& last_dos_alias_parent[0] && last_dos_alias_real[0]) {
|
||||
build_dos_83_alias(options, last_dos_alias_parent,
|
||||
last_dos_alias_real, stb->st_ino, out, out_len);
|
||||
if (last_dos_alias_alias[0]) {
|
||||
strmaxcpy(out, last_dos_alias_alias, out_len-1);
|
||||
up_fn(out);
|
||||
} else {
|
||||
build_dos_83_alias(options, last_dos_alias_parent,
|
||||
last_dos_alias_real, stb->st_ino, out, out_len);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2585,6 +2599,7 @@ void get_dos_file_attrib(NW_DOS_FILE_INFO *f,
|
||||
uint8 spath[14];
|
||||
uint32 nw_owner=get_file_owner(stb);
|
||||
build_dos_attr_name(volume, path, unixname, stb, spath, sizeof(spath));
|
||||
XDPRINTF((1,0,"DOSFILEATTR path='%s' unix='%s' alias='%s' inode=%ld", path ? (char*)path : "", unixname ? unixname : "", spath, stb ? (long)stb->st_ino : 0L));
|
||||
f->namlen=min(strlen((char*)spath), 12);
|
||||
strncpy((char*)f->name, (char*)spath, f->namlen);
|
||||
U32_TO_32(get_nw_attrib_dword(volume, unixname, stb), f->attributes);
|
||||
@@ -2611,6 +2626,7 @@ void get_dos_dir_attrib(NW_DOS_DIR_INFO *f,
|
||||
{
|
||||
uint8 spath[14];
|
||||
build_dos_attr_name(volume, path, unixname, stb, spath, sizeof(spath));
|
||||
XDPRINTF((1,0,"DOSFILEATTR path='%s' unix='%s' alias='%s' inode=%ld", path ? (char*)path : "", unixname ? unixname : "", spath, stb ? (long)stb->st_ino : 0L));
|
||||
f->namlen=min(strlen((char*)spath), 12);
|
||||
strncpy((char*)f->name, (char*)spath, f->namlen);
|
||||
U32_TO_32(get_nw_attrib_dword(volume, unixname, stb),
|
||||
|
||||
Reference in New Issue
Block a user