From b222ced32aadf4a46708bba9b87ed910839ce2b8 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 8 Jan 2018 16:32:43 +0100 Subject: dateibeziehungen.pas: tMach.sammleDateien repariert --- Make.lps | 93 ++++++++++++++++++++++++++++------------------------ dateibeziehungen.pas | 17 ++++++++-- 2 files changed, 65 insertions(+), 45 deletions(-) diff --git a/Make.lps b/Make.lps index c013b8a..afb70ff 100644 --- a/Make.lps +++ b/Make.lps @@ -7,8 +7,8 @@ - - + + @@ -30,7 +30,6 @@ - @@ -41,9 +40,10 @@ + - - + + @@ -132,117 +132,126 @@ - + - + - - + + - - + + - + - - + + - + - + - + + - + - - + + - - + + - - + + - - + - + - - + + - + - + - + - + - + - - + + - - + + - + + - + - + - + + + + + + + + + diff --git a/dateibeziehungen.pas b/dateibeziehungen.pas index f7fb94a..4fb444f 100644 --- a/dateibeziehungen.pas +++ b/dateibeziehungen.pas @@ -924,19 +924,30 @@ var sR: tSearchRec; err,i: longint; weglassen: boolean; + rest: string; begin result:=0; - err:=findFirst(wo,fareadOnly or faHidden or faSysFile or (byte(rekursiv)*faDirectory),sR); + rest:=''; + if pos('*',wo)>0 then begin // wir müssen globben + rest:=wo; + erstesArgument(rest,'*',false); + erstesArgument(rest,'/',false); + if rest<>'' then + delete(wo,length(wo)-length(rest),length(rest)+1); + end; + if (rest='') and rekursiv then // rekursive Suche angefordert + rest:='*'; + err:=findFirst(wo,fareadOnly or faHidden or faSysFile or (byte(rest<>'')*faDirectory),sR); while err=0 do begin weglassen:=false; for i:=0 to length(_ign)-1 do weglassen:=weglassen or _ign[i].exec(extractFilePath(wo)+sR.name); if not weglassen then begin if sR.attr and faDirectory <> 0 then begin - if rekursiv and + if (rest<>'') and (sR.name<>'.') and (sR.name<>'..') then - result:=result+sammleDateien(extractFilePath(wo)+sR.name+'/*',rekursiv); + result:=result+sammleDateien(extractFilePath(wo)+sR.name+'/'+rest,rekursiv); end else begin inc(result); -- cgit v1.2.3-70-g09d2