Mercurial > forge
changeset 12420:e0e1839e1dac octave-forge
Fix filename error msg; cd out of tmp dir before attempting to remove it
author | prnienhuis |
---|---|
date | Sun, 06 Apr 2014 20:20:49 +0000 |
parents | 60ee77bf0d93 |
children | ffccd912a417 |
files | main/io/inst/private/__OCT_spsh_close__.m |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/main/io/inst/private/__OCT_spsh_close__.m Sun Apr 06 19:07:06 2014 +0000 +++ b/main/io/inst/private/__OCT_spsh_close__.m Sun Apr 06 20:20:49 2014 +0000 @@ -31,7 +31,9 @@ ## 2014-01-22 Zip quietly; zip into current dir, not temp dir ## 2014-01-24 Call confirm_recursive_subdir locally ## 2014-01-28 Zip both .ods & xlsx, gzip .gnumeric -## '' Reorganize code a bit +## '' Reorganize code a bit +## 2014-04-06 Fix filename arg in error msg +## '' cd out of tmp dir before removing it function [xls] = __OCT_spsh_close__ (xls) @@ -40,6 +42,8 @@ opwd = pwd; if (isempty (pth)) filename = [ opwd filesep xls.filename ]; + else + filename = xls.filename; endif ## .ods and.xlsx are both zipped @@ -52,7 +56,7 @@ system (sprintf ("zip -q -r %s *.* .", filename)); xls.changed = 0; catch - printf ("odsclose: could not zip ods contents in %s to %s", xls.workbook, filename); + printf ("odsclose: could not zip ods contents in %s to %s\n", xls.workbook, filename); end_try_catch; endif @@ -64,12 +68,12 @@ endif ## Delete tmp file and return to work dir + cd (opwd); if (! xls.changed) ## Below is needed for a silent delete of our tmpdir confirm_recursive_rmdir (0, "local"); rmdir (xls.workbook, "s"); endif - cd (opwd); endfunction