rejetto forum

macro rename little bug

Mars · 2 · 1336

0 Members and 1 Guest are viewing this topic.

Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 1987
    • View Profile
main.pas
Quote
   if name = 'rename' then
      if renameFile(p, par(1))
      and not stopOnMacroRename then // should we stop recursion?
        try
          // by default, we'll stop after first stacked [on macro rename], but recursive=1 will remove this limit
          stopOnMacroRename:=isFalse(par('recursive'));
          runEventScript('on macro rename', toSA(['%old-name%',p,'%new-name%',par(1)]));
          spaceIf(TRUE);
        finally
          stopOnMacroRename:=FALSE;
        end
      else result:=''// add by mars

Else ....when a rename failed, the macro is replaced by <div class=macroerror>macro error: ' ...


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13291
    • View Profile