@@ -357,7 +357,7 @@ remote_copy_file(PGconn *conn, pgFile* file)
357357 elog (ERROR , "final receive failed: status %d ; %s" ,PQresultStatus (res ), PQerrorMessage (conn ));
358358 }
359359
360- file -> write_size = file -> read_size ;
360+ file -> write_size = ( int ) file -> read_size ;
361361 FIN_CRC32C (file -> crc );
362362
363363 fclose (out );
@@ -438,8 +438,8 @@ remote_backup_files(void *arg)
438438 /* receive the data from stream and write to backup file */
439439 remote_copy_file (file_backup_conn , file );
440440
441- elog (VERBOSE , "File \"%s\". Copied %lu bytes" ,
442- file -> path , ( unsigned long ) file -> write_size );
441+ elog (VERBOSE , "File \"%s\". Copied %d bytes" ,
442+ file -> path , file -> write_size );
443443 PQfinish (file_backup_conn );
444444 }
445445
@@ -2099,27 +2099,24 @@ backup_files(void *arg)
20992099 continue ;
21002100 }
21012101 }
2102- else
2103- /* TODO:
2104- * Check if file exists in previous backup
2105- * If exists:
2106- * if mtime > start_backup_time of parent backup,
2107- * copy file to backup
2108- * if mtime < start_backup_time
2109- * calculate crc, compare crc to old file
2110- * if crc is the same -> skip file
2111- */
2112- if (!copy_file (arguments -> from_root ,
2113- arguments -> to_root ,
2114- file ))
2102+ /* TODO:
2103+ * Check if file exists in previous backup
2104+ * If exists:
2105+ * if mtime > start_backup_time of parent backup,
2106+ * copy file to backup
2107+ * if mtime < start_backup_time
2108+ * calculate crc, compare crc to old file
2109+ * if crc is the same -> skip file
2110+ */
2111+ else if (!copy_file (arguments -> from_root , arguments -> to_root , file ))
21152112 {
21162113 file -> write_size = BYTES_INVALID ;
21172114 elog (VERBOSE , "File \"%s\" was not copied to backup" , file -> path );
21182115 continue ;
21192116 }
21202117
2121- elog (VERBOSE , "File \"%s\". Copied %lu bytes" ,
2122- file -> path , ( unsigned long ) file -> write_size );
2118+ elog (VERBOSE , "File \"%s\". Copied %d bytes" ,
2119+ file -> path , file -> write_size );
21232120 }
21242121 else
21252122 elog (LOG , "unexpected file type %d" , buf .st_mode );
0 commit comments