1
0
Fork 0

Create parent directory only

Dieser Commit ist enthalten in:
Thomas Forgione 2019-03-11 17:52:57 +01:00
Ursprung f7e8a96550
Commit 5172e2cb57
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 203DAEA747F48F41
1 geänderte Dateien mit 4 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -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()])