mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-21 11:20:04 +02:00
copying binary not done properly
This commit is contained in:
parent
93a86324fb
commit
fa822634aa
@ -527,7 +527,7 @@ int writeBinaryFile(char *mess, char *fname, char *buffer,
|
|||||||
if ((unitSize + bytesWritten) > filesize) {
|
if ((unitSize + bytesWritten) > filesize) {
|
||||||
writeSize = filesize - bytesWritten;
|
writeSize = filesize - bytesWritten;
|
||||||
}
|
}
|
||||||
size_t bytes = fwrite(buffer, 1, writeSize, fp);
|
size_t bytes = fwrite((buffer + bytesWritten, 1, writeSize, fp);
|
||||||
|
|
||||||
// write
|
// write
|
||||||
if (bytes != (size_t)writeSize) {
|
if (bytes != (size_t)writeSize) {
|
||||||
@ -543,6 +543,7 @@ int writeBinaryFile(char *mess, char *fname, char *buffer,
|
|||||||
LOG(logDEBUG1,
|
LOG(logDEBUG1,
|
||||||
("bytesWritten:%lu filesize:%lu\n", bytesWritten, filesize));
|
("bytesWritten:%lu filesize:%lu\n", bytesWritten, filesize));
|
||||||
}
|
}
|
||||||
|
printf("\n");
|
||||||
if (fclose(fp) != 0) {
|
if (fclose(fp) != 0) {
|
||||||
sprintf(mess,
|
sprintf(mess,
|
||||||
"Could not copy detector server. (closing file pointer)\n");
|
"Could not copy detector server. (closing file pointer)\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user