diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-01-18 11:26:31 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-01-18 13:56:11 +0000 |
commit | 188c2613b3744345e2ba3d4cfd0bcc47b12b74ae (patch) | |
tree | 48f1d343553bcc4b06c1e7a713e0e393e03d6091 | |
parent | 1ef70f118a9638f78c8135e361b422322c8e30f2 (diff) |
strip: Close debug file before unlinking it on errorQtCreator4.9.2QtCreator4.9.1QtCreator4.9.0-rc1QtCreator4.9.0-beta2QtCreator4.9.0-beta1QtCreator4.9.0QtCreator4.10.2QtCreator4.10.1QtCreator4.10.0-rc1QtCreator4.10.0-beta2QtCreator4.10.0-beta1QtCreator4.10.04.94.10
On some platforms, notably windows, you cannot unlink open files.
Change-Id: Ifd73520005b3c233c112baf0b72fd8cf2f57c671
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r-- | src/strip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/strip.c b/src/strip.c index aad1035b..0d570c29 100644 --- a/src/strip.c +++ b/src/strip.c @@ -2671,14 +2671,14 @@ cleanup_debug (void) { if (debug_fd >= 0) { + close (debug_fd); + debug_fd = -1; if (tmp_debug_fname != NULL) { unlink (tmp_debug_fname); free (tmp_debug_fname); tmp_debug_fname = NULL; } - close (debug_fd); - debug_fd = -1; } } |