Changeset 20325


Ignore:
Timestamp:
03/21/16 13:00:58 (9 years ago)
Author:
Mathieu Morlighem
Message:

CHG: always write a file if file cannot be written using user's path

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/exp/expwrite.m

    r16162 r20325  
    2828
    2929fid=fopen(filename,'w');
     30if fid==-1,
     31        choice=input(['WARNING: file ' filename ' could not be created, would you like to save your exp as ./temp_expwrite.exp? (y/n)'],'s');
     32        if ~strcmpi(choice,'y'),
     33                disp('no file written... exiting');
     34                return
     35        end
     36        fid=fopen('./temp_expwrite.exp','w');
     37end
    3038for n=1:length(a),
    3139        if(length(a(n).x)~=length(a(n).y)),
Note: See TracChangeset for help on using the changeset viewer.