remove store and temp store directory before clone

This commit is contained in:
Bob Sun 2017-02-15 22:51:26 +08:00
parent 545a5b11bb
commit d9b931345a
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4

View file

@ -99,6 +99,9 @@ class PasswordStore {
credential: GitCredential,
transferProgressBlock: @escaping (UnsafePointer<git_transfer_progress>, UnsafeMutablePointer<ObjCBool>) -> Void,
checkoutProgressBlock: @escaping (String?, UInt, UInt) -> Void) throws {
Utils.removeFileIfExists(at: storeURL)
Utils.removeFileIfExists(at: tempStoreURL)
let credentialProvider = try credential.credentialProvider()
let options: [String: Any] = [
GTRepositoryCloneOptionsCredentialProvider: credentialProvider,