Create parent directory only

这个提交包含在:
Thomas Forgione 2019-03-11 17:52:57 +01:00
父节点 f7e8a96550
当前提交 5172e2cb57
找不到此签名对应的密钥
GPG 密钥 ID: 203DAEA747F48F41
共有 1 个文件被更改,包括 4 次插入1 次删除

查看文件

@ -92,7 +92,10 @@ fn clone_dirty<P: AsRef<Path>>(url: &str, place: P) -> Result<()> {
return Err(Error::PathAlreadyExists);
}
create_dir_all(place)?;
// Need to create the parent dir only if it exists
if let Some(parent) = place.parent() {
create_dir_all(parent)?;
}
let command = Command::new("git")
.args(&["clone", &url, &place.display().to_string()])