aboutsummaryrefslogtreecommitdiff
path: root/src/backup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backup.c')
-rw-r--r--src/backup.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backup.c b/src/backup.c
index 9c85198..b268fb6 100644
--- a/src/backup.c
+++ b/src/backup.c
@@ -1,5 +1,5 @@
/* This file is part of Idest.
- Copyright (C) 2009-2011 Sergey Poznyakoff
+ Copyright (C) 2009-2011, 2016 Sergey Poznyakoff
Idest is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -137,6 +137,8 @@ copy_file(const char *file, const char *dst_file)
return 1;
}
+ fsize = st.st_size;
+
for (bufsize = fsize;
bufsize > 0 && (buf = malloc(bufsize)) == NULL;
bufsize /= 2);
@@ -144,7 +146,6 @@ copy_file(const char *file, const char *dst_file)
xalloc_die();
rc = 0;
- fsize = st.st_size;
while (fsize > 0) {
size_t rest;
size_t rdbytes;

Return to:

Send suggestions and report system problems to the System administrator.