diff mbox series

archive handler: add sync

Message ID 20221113133554.73318-1-ayoub.zaki@embetrix.com
State Accepted
Headers show
Series archive handler: add sync | expand

Commit Message

Ayoub Zaki Nov. 13, 2022, 1:35 p.m. UTC
libarchive makes usage of buffered files, add a sync() call after installing the archive file(s).

Signed-off-by: Ayoub Zaki <ayoub.zaki@embetrix.com>
---
 handlers/archive_handler.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Stefano Babic Nov. 13, 2022, 2:42 p.m. UTC | #1
Hi Ayoub,

On 13.11.22 14:35, Ayoub Zaki wrote:
> libarchive makes usage of buffered files, add a sync() call after installing the archive file(s).
> 
> Signed-off-by: Ayoub Zaki <ayoub.zaki@embetrix.com>
> ---
>   handlers/archive_handler.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/handlers/archive_handler.c b/handlers/archive_handler.c
> index e3a1463..0ca22ca 100644
> --- a/handlers/archive_handler.c
> +++ b/handlers/archive_handler.c
> @@ -380,6 +380,7 @@ out:
>   		}
>   	}
>   
> +	sync();
>   	free(DATADST_DIR);
>   	free(FIFO);
>   

Applied to -master, thanks !

Best regards,
Stefano Babic
diff mbox series

Patch

diff --git a/handlers/archive_handler.c b/handlers/archive_handler.c
index e3a1463..0ca22ca 100644
--- a/handlers/archive_handler.c
+++ b/handlers/archive_handler.c
@@ -380,6 +380,7 @@  out:
 		}
 	}
 
+	sync();
 	free(DATADST_DIR);
 	free(FIFO);