Mercurial > octave
comparison scripts/pkg/pkg.m @ 30930:f67d2ce5d6d4 stable
pkg.m: Create directory before saving file (bug #62303).
* scripts/pkg/pkg.m: Create directory before saving file when rebuilding package
index.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Tue, 12 Apr 2022 17:07:01 +0200 |
parents | 796f54d4ddbf |
children | 65c4d98352d3 |
comparison
equal
deleted
inserted
replaced
30928:fc3b7160ba77 | 30930:f67d2ce5d6d4 |
---|---|
694 if (ispc) | 694 if (ispc) |
695 ## On Windows ensure LFN paths are saved rather than 8.3 style paths | 695 ## On Windows ensure LFN paths are saved rather than 8.3 style paths |
696 global_packages = standardize_paths (global_packages); | 696 global_packages = standardize_paths (global_packages); |
697 endif | 697 endif |
698 global_packages = make_rel_paths (global_packages); | 698 global_packages = make_rel_paths (global_packages); |
699 global_list_dir = fileparts (global_list); | |
700 if (! isempty (global_list_dir) && ! exist (global_list_dir, "dir")) | |
701 mkdir (global_list_dir); | |
702 endif | |
699 save (global_list, "global_packages"); | 703 save (global_list, "global_packages"); |
700 if (nargout) | 704 if (nargout) |
701 local_packages = global_packages; | 705 local_packages = global_packages; |
702 endif | 706 endif |
703 else | 707 else |
704 local_packages = rebuild (prefix, archprefix, local_list, files, | 708 local_packages = rebuild (prefix, archprefix, local_list, files, |
705 verbose); | 709 verbose); |
706 local_packages = save_order (local_packages); | 710 local_packages = save_order (local_packages); |
707 if (ispc) | 711 if (ispc) |
708 local_packages = standardize_paths (local_packages); | 712 local_packages = standardize_paths (local_packages); |
713 endif | |
714 local_list_dir = fileparts (local_list); | |
715 if (! isempty (local_list_dir) && ! exist (local_list_dir, "dir")) | |
716 mkdir (local_list_dir); | |
709 endif | 717 endif |
710 save (local_list, "local_packages"); | 718 save (local_list, "local_packages"); |
711 if (! nargout) | 719 if (! nargout) |
712 clear ("local_packages"); | 720 clear ("local_packages"); |
713 endif | 721 endif |