mirror of https://github.com/lapce/lapce.git
get file with permission
This commit is contained in:
parent
a6431cb75b
commit
8ac6f6b909
|
@ -575,10 +575,16 @@ fn handle_request(&self, id: RequestId, rpc: Request) {
|
|||
let mut dirs = Vec::new();
|
||||
dirs.push(workspace.clone());
|
||||
while let Some(dir) = dirs.pop() {
|
||||
for entry in fs::read_dir(dir).unwrap() {
|
||||
if let Ok(readdir) = fs::read_dir(dir) {
|
||||
for entry in readdir {
|
||||
let entry = entry.unwrap();
|
||||
let path = entry.path();
|
||||
if entry.file_name().to_str().unwrap().starts_with(".") {
|
||||
if entry
|
||||
.file_name()
|
||||
.to_str()
|
||||
.unwrap()
|
||||
.starts_with(".")
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if path.is_dir() {
|
||||
|
@ -596,6 +602,7 @@ fn handle_request(&self, id: RequestId, rpc: Request) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
local_dispatcher
|
||||
.respond(id, Ok(serde_json::to_value(items).unwrap()));
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue