rejetto forum

uri2diskMaybeFolder : correctif

Mars · 2 · 1328

0 Members and 1 Guest are viewing this topic.

Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2039
    • View Profile
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