fix: validate remote workdir grants before leasing

This commit is contained in:
2026-08-19 11:42:49 +09:00
parent 5f2798458e
commit 84f1b229ba
2 changed files with 70 additions and 8 deletions
+8 -2
View File
@@ -341,7 +341,7 @@ mod client {
}
let mut delegations = self.delegations.clone();
delegations.push(request.clone());
Ok(Arc::new(Self {
let candidate = Arc::new(Self {
client: self.client.clone(),
base_url: self.base_url.clone(),
authorization: self.authorization.clone(),
@@ -350,7 +350,13 @@ mod client {
capabilities: self.capabilities,
delegations,
closed: AtomicBool::new(false),
}))
});
candidate
.stat(StatRequest {
path: fs_operation::FsPath::new("").expect("empty Workdir path is valid"),
})
.await?;
Ok(candidate)
}
async fn stat(&self, request: StatRequest) -> Result<StatResult, WorkdirError> {