mirror of https://github.com/0intro/conterm
fix name bug; try to use bigger offsets
This commit is contained in:
parent
be768764da
commit
d1b585cfe2
|
@ -1,3 +1,4 @@
|
||||||
|
#include "u.h"
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
|
@ -9,7 +10,6 @@
|
||||||
#ifndef NAME_MAX
|
#ifndef NAME_MAX
|
||||||
# define NAME_MAX 256
|
# define NAME_MAX 256
|
||||||
#endif
|
#endif
|
||||||
#include "u.h"
|
|
||||||
#include "lib.h"
|
#include "lib.h"
|
||||||
#include "dat.h"
|
#include "dat.h"
|
||||||
#include "fns.h"
|
#include "fns.h"
|
||||||
|
@ -33,7 +33,7 @@ struct Ufsinfo
|
||||||
int uid;
|
int uid;
|
||||||
int gid;
|
int gid;
|
||||||
DIR* dir;
|
DIR* dir;
|
||||||
ulong offset;
|
vlong offset;
|
||||||
QLock oq;
|
QLock oq;
|
||||||
char nextname[NAME_MAX];
|
char nextname[NAME_MAX];
|
||||||
};
|
};
|
||||||
|
@ -160,8 +160,7 @@ fswalk(Chan *c, Chan *nc, char **name, int nname)
|
||||||
cname = addelem(cname, name[i]);
|
cname = addelem(cname, name[i]);
|
||||||
wq->qid[i] = nc->qid;
|
wq->qid[i] = nc->qid;
|
||||||
}
|
}
|
||||||
nc->name = nil;
|
nc->name = cname;
|
||||||
cnameclose(cname);
|
|
||||||
if(i != nname){
|
if(i != nname){
|
||||||
cclose(nc);
|
cclose(nc);
|
||||||
wq->clone = nil;
|
wq->clone = nil;
|
||||||
|
|
|
@ -172,8 +172,7 @@ fswalk(Chan *c, Chan *nc, char **name, int nname)
|
||||||
cname = addelem(cname, name[i]);
|
cname = addelem(cname, name[i]);
|
||||||
wq->qid[i] = nc->qid;
|
wq->qid[i] = nc->qid;
|
||||||
}
|
}
|
||||||
nc->name = nil;
|
nc->name = cname;
|
||||||
cnameclose(cname);
|
|
||||||
if(i != nname){
|
if(i != nname){
|
||||||
cclose(nc);
|
cclose(nc);
|
||||||
wq->clone = nil;
|
wq->clone = nil;
|
||||||
|
|
Loading…
Reference in New Issue