Merge pull request #536 from nulltoken/fix/transport-segfault

Fix transport segfault
This commit is contained in:
Vicent Martí 2012-01-17 11:01:04 -08:00
commit d1317f1b69
3 changed files with 3 additions and 3 deletions

View File

@ -169,7 +169,7 @@ int git_repository_open(git_repository **repo_out, const char *path)
if (quickcheck_repository_dir(&path_buf) < GIT_SUCCESS) {
error = git__throw(GIT_ENOTAREPO,
"The given path is not a valid Git repository");
"The given path (%s) is not a valid Git repository", git_buf_cstr(&path_buf));
goto cleanup;
}

View File

@ -23,7 +23,7 @@ static struct {
{NULL, 0}
};
#define GIT_TRANSPORT_COUNT (sizeof(transports)/sizeof(transports[0]))
#define GIT_TRANSPORT_COUNT (sizeof(transports)/sizeof(transports[0])) - 1
static git_transport_cb transport_find_fn(const char *url)
{

View File

@ -80,7 +80,7 @@ static int do_lstat(const char *file_name, struct stat *buf)
buf->st_uid = 0;
buf->st_nlink = 1;
buf->st_mode = (mode_t)fMode;
buf->st_size = (fdata.nFileSizeHigh << 32) + fdata.nFileSizeLow;
buf->st_size = ((git_off_t)fdata.nFileSizeHigh << 32) + fdata.nFileSizeLow;
buf->st_dev = buf->st_rdev = (_getdrive() - 1);
buf->st_atime = filetime_to_time_t(&(fdata.ftLastAccessTime));
buf->st_mtime = filetime_to_time_t(&(fdata.ftLastWriteTime));