Changeset 154 for prdatasets/pr_download.m
- Timestamp:
- 01/12/20 23:45:24 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
prdatasets/pr_download.m
r153 r154 239 239 global ASK 240 240 241 if ASK && ~isempty(datsize) % ask only if datsize has been set 242 if datsize ~= 0 243 siz = ['(' num2str(datsize) ' MB)']; 244 else 245 siz = ''; 246 end 241 if ASK && ~isempty(datsize) && datsize > 1 % ask only if datsize has been set 242 siz = ['(' num2str(datsize) ' MB)']; 247 243 q = input(['Dataset is not available, OK to download ' siz ' [y]/n ?'],'s'); 248 244 if ~isempty(q) && ~strcmp(q,'y') 249 245 error('No dataset') 250 246 end 247 disp(['Downloading ' urlname ' (' num2str(siz) ' MB) ....']) 251 248 else 252 siz = [];253 end254 255 if isempty(siz)256 249 disp(['Downloading ' urlname ' ....']) 257 else258 disp(['Downloading ' urlname ' (' num2str(siz) ' MB) ....'])259 250 end 260 251 … … 463 454 464 455 if ASK 465 if ~isempty(size) 456 if ~isempty(size) && size > 1 466 457 siz = ['(' num2str(size) ' MB)']; 467 else 468 siz = ''; 469 end 470 q = input(['Dataset is not available, OK to download ' siz ' [y]/n ?'],'s'); 471 if ~isempty(q) && ~strcmp(q,'y') 472 error('Dataset not found') 458 q = input(['Dataset is not available, OK to download ' siz ' [y]/n ?'],'s'); 459 if ~isempty(q) && ~strcmp(q,'y') 460 error('Dataset not found') 461 end 473 462 end 474 463 end
Note: See TracChangeset
for help on using the changeset viewer.