ncls: handle_deref() #693

pull/1158/head
nick black 4 years ago committed by Nick Black
parent 41c7dece64
commit bc8905b30c

@ -60,6 +60,13 @@ handle_dir(const char* p, const struct stat* st, bool longlisting,
return 0;
}
static int
handle_deref(const char* p, const struct stat* st, bool longlisting,
bool recursedirs, bool directories){
// FIXME dereference and rerun on target
return 0;
}
static int
handle_path(const char* p, bool longlisting, bool recursedirs,
bool directories, bool dereflinks, bool toplevel){
@ -71,12 +78,11 @@ handle_path(const char* p, bool longlisting, bool recursedirs,
if((st.st_mode & S_IFMT) == S_IFDIR){
return handle_dir(p, &st, longlisting, recursedirs, directories, toplevel);
}else if((st.st_mode & S_IFMT) == S_IFLNK){
// FIXME deal with dereflinks
return handle_inode(p, &st, longlisting);
}else{
return handle_inode(p, &st, longlisting);
if(toplevel && dereflinks){
return handle_deref(p, &st, longlisting, recursedirs, directories);
}
return 0;
}
return handle_inode(p, &st, longlisting);
}
static int

Loading…
Cancel
Save