Skip to content
Snippets Groups Projects
Commit fbb7d277 authored by Marco Berzborn's avatar Marco Berzborn
Browse files

some cleanup and fixed path handling

parent c2c2bb53
Branches
No related tags found
No related merge requests found
......@@ -37,12 +37,6 @@ outpathStr = [];
outpathList = [];
tokenIdx = [0 findstr(pathStr,pathsep)];
if isunix
separator = ':';
else
separator = ';';
end
for idx=1:(length(tokenIdx)-1)
tokenCell{idx} = pathStr(tokenIdx(idx)+1:tokenIdx(idx+1)-1); %get single folder name
isIgnore = false;
......@@ -51,7 +45,7 @@ for idx=1:(length(tokenIdx)-1)
isIgnore = ~isempty(foundIdx) || isIgnore;
end
if ~isIgnore %add string token
outpathStr = [outpathStr separator tokenCell{idx}]; %#ok<*AGROW>
outpathStr = [outpathStr,pathsep,tokenCell{idx}]; %#ok<*AGROW>
idxITA = findstr(tokenCell{idx},prefixToolbox); %pdi
outpathList = [outpathList; {tokenCell{idx}(idxITA:end)}]; %throw away 'C:\...' until ITA-TB path
end
......
......@@ -55,10 +55,9 @@ if save_state == 1
userpath('reset');
end
userfolder = evalin('base','userpath');
userfolder = userfolder(1:end-1);
savepath([userfolder filesep 'pathdef.m']);
savepath(fullfile(userfolder,'pathdef.m'));
try
copyfile([fullpath filesep 'kernel' filesep 'StandardRoutines' filesep 'ita_startup.m'], [userfolder filesep 'startup.m'] )
copyfile(fullfile(fullpath,'kernel','StandardRoutines','ita_startup.m'), fullfile(userfolder,'startup.m'))
catch theError
ita_verbose_info('ita_path_handling:writing pathdef unsuccessful, because:',0);
disp(theError.message);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment