Changeset 266
- Timestamp:
- Nov 8, 2011, 1:26:19 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r265 r266 2515 2515 if isequal(subdir_civ1,''),subdir_civ1='CIV'; end% put default subdir 2516 2516 if isequal(subdir_civ2,''),subdir_civ2=subdir_civ1; end% put default subdir 2517 currentdir=pwd;%store the current working directory2517 % currentdir=pwd;%store the current working directory 2518 2518 [Path_ima,Name]=fileparts(filebase);%Path of the image files (.civ) 2519 2519 if ~exist(Path_ima,'dir') … … 2526 2526 msgbox_uvmat('ERROR',['No writting access to ' Path_ima]) 2527 2527 filecell={}; 2528 cd(currentdir);2528 % cd(currentdir); 2529 2529 return 2530 2530 end … … 2570 2570 return 2571 2571 elseif isunix 2572 [xx,msg2] = fileattrib( subdir_civ1_new,'+w','g'); %yield writing access (+w) to user group (g)2572 [xx,msg2] = fileattrib(fullfile(Path_ima,subdir_civ1_new),'+w','g'); %yield writing access (+w) to user group (g) 2573 2573 if ~strcmp(msg2,'') 2574 msgbox_uvmat('ERROR',['pb of permission for ' subdir_civ1_new': ' msg2])%error message for directory creation2574 msgbox_uvmat('ERROR',['pb of permission for ' fullfile(Path_ima,subdir_civ1_new) ': ' msg2])%error message for directory creation 2575 2575 filecell={}; 2576 2576 return … … 2613 2613 return 2614 2614 else 2615 [xx,msg2] = fileattrib( subdir_civ1_new,'+w','g'); %yield writing access (+w) to user group (g)2615 [xx,msg2] = fileattrib(fullfile(Path_ima,subdir_civ1_new),'+w','g'); %yield writing access (+w) to user group (g) 2616 2616 if ~strcmp(msg2,'') 2617 2617 msgbox_uvmat('ERROR',['pb of permission for ' subdir_civ1_new ': ' msg2])%error message for directory creation … … 2639 2639 msgbox_uvmat('ERROR',[filecell.ima1.civ1{ifile,indexj} ' not found']) 2640 2640 filecell={}; 2641 cd(currentdir)2641 % cd(currentdir) 2642 2642 return 2643 2643 end … … 2646 2646 msgbox_uvmat('ERROR',[filecell.ima2.civ1{ifile,indexj} ' not found']) 2647 2647 filecell={}; 2648 cd(currentdir)2648 %cd(currentdir) 2649 2649 return 2650 2650 end … … 2664 2664 msgbox_uvmat('ERROR',[filecell.imaA1.civ1{ifile,indexj} ' not found']) 2665 2665 filecell={}; 2666 cd(currentdir)2666 % cd(currentdir) 2667 2667 return 2668 2668 end … … 2671 2671 msgbox_uvmat('ERROR',[filecell.imaA2.civ1{ifile,indexj} ' not found']) 2672 2672 filecell={}; 2673 cd(currentdir)2673 % cd(currentdir) 2674 2674 return 2675 2675 end … … 2687 2687 msgbox_uvmat('ERROR',[filename ' not found']) 2688 2688 filecell={}; 2689 cd(currentdir)2689 % cd(currentdir) 2690 2690 return 2691 2691 end … … 2703 2703 set(handles.RUN,'BackgroundColor',[1 0 0]) 2704 2704 filecell={}; 2705 cd(currentdir)2705 %cd(currentdir) 2706 2706 return 2707 2707 end … … 2744 2744 if ~exist(fullfile(Path_ima,subdir_civ2_new),'dir') 2745 2745 [xx,m2]=mkdir(fullfile(Path_ima,subdir_civ2_new)); 2746 [xx,msg2] = fileattrib( subdir_civ2_new,'+w','g'); %yield writing access (+w) to user group (g)2746 [xx,msg2] = fileattrib(fullfile(Path_ima,subdir_civ2_new),'+w','g'); %yield writing access (+w) to user group (g) 2747 2747 if ~isequal(m2,'') 2748 msgbox_uvmat('ERROR',['cannot create ' subdir_civ2_new': ' m2])2748 msgbox_uvmat('ERROR',['cannot create ' fullfile(Path_ima,subdir_civ2_new) ': ' m2]) 2749 2749 filecell={}; 2750 cd(currentdir)2750 % cd(currentdir) 2751 2751 return 2752 2752 end … … 2779 2779 if ~exist(fullfile(Path_ima,subdir_civ2_new),'dir') 2780 2780 [xx,m2]=mkdir(subdir_civ2_new); 2781 [xx,msg2] = fileattrib( subdir_civ2_new,'+w','g'); %yield writing access (+w) to user group (g)2781 [xx,msg2] = fileattrib(fullfile(Path_ima,subdir_civ2_new),'+w','g'); %yield writing access (+w) to user group (g) 2782 2782 if ~isequal(m2,'') 2783 msgbox_uvmat('ERROR', ['cannot create ' subdir_civ2_new': ' m2])%error message for directory creation2784 cd(currentdir)2783 msgbox_uvmat('ERROR', ['cannot create ' fullfile(Path_ima,subdir_civ2_new) ': ' m2])%error message for directory creation 2784 % cd(currentdir) 2785 2785 filecell={}; 2786 2786 return … … 2791 2791 subdir_civ2=subdir_civ2_new; 2792 2792 end 2793 cd(currentdir);%come back to the current working directory2793 %cd(currentdir);%come back to the current working directory 2794 2794 2795 2795 %%%%%%%%%%%%% if civ2 results are obtained or used %%%%%%%%%%%%%
Note: See TracChangeset
for help on using the changeset viewer.