rejetto forum

Software => HFS ~ HTTP File Server => Programmers corner => Topic started by: Mars on May 14, 2009, 11:29:54 PM

Title: uri2diskMaybeFolder : correctif
Post by: Mars on May 14, 2009, 11:29:54 PM
Quote
  function uri2diskMaybeFolder(s:string):string; // like uri2diskMaybe, but limited to the path, excluding the filename
  var
    path: string;
  begin
  if ansiContainsStr(s, '/') then
    begin
    path:=chop(lastDelimiter('/\',s), s);
    path:=uri2disk(path);                 //mod by mars
    if path>'' then s:=path+'\'+s;       //add by mars
    end;
  result:=s;
  end; // uri2diskMaybeFolder

when  uri2disk(path) was empty ,  s become the value  '\'+s  , not correct
Title: Re: uri2diskMaybeFolder : correctif
Post by: rejetto on May 18, 2009, 03:10:48 PM
thank you!