Mercurial > octave
changeset 25131:0cd7076a97c8 stable
pkg.m: Don't leave behind temporary directories if error occurs during install (bug #53567).
* pkg.m: Change unwind_protect_cleanup to use rmdir with recursive option to
delete both temporary files and the temporary directory they were in.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 05 Apr 2018 17:39:15 -0700 |
parents | 2bc071fc7f6b |
children | 25369fcbf6f3 4ccb4f6e59ca |
files | scripts/pkg/pkg.m |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/pkg/pkg.m Thu Apr 05 16:01:50 2018 -0700 +++ b/scripts/pkg/pkg.m Thu Apr 05 17:39:15 2018 -0700 @@ -437,7 +437,9 @@ global_list, global_install); unwind_protect_cleanup - cellfun ("unlink", local_files); + if (exist (tmp_dir, "file")) + rmdir (tmp_dir, "s"); + endif end_unwind_protect case "uninstall"