Changeset 1337 for trunk/dll/command.c


Ignore:
Timestamp:
Dec 13, 2008, 1:17:02 AM (17 years ago)
Author:
Gregg Young
Message:

Command that don't require a file as input now run when the DIRCNR with focus is empty. (Ticket 313)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/command.c

    r1247 r1337  
    10211021
    10221022  list = BuildList(hwnd);
    1023   if (!list || !list[0])
    1024     return;
    10251023  x = 0;
    10261024  info = cmdhead;
     
    10441042      flags |= SEPARATE;
    10451043    flags &= ~(KEEP | DIEAFTER);
    1046     if ((flags & ONCE) && list && list[0]) {
     1044    if (!strchr(info->pszCmdLine, '%')) {
     1045      CHAR *fakelist[2];
     1046
     1047      *fakelist = "C";
     1048      fakelist[1] = NULL;
     1049      ExecOnList(hwnd,
     1050                 info->pszCmdLine,
     1051                 flags, NULL, fakelist, GetPString(IDS_EXECCMDTITLETEXT),
     1052                 pszSrcFile, __LINE__);
     1053    }
     1054    else if ((flags & ONCE) && list && list[0]) {
    10471055
    10481056      CHAR *fakelist[2];
     
    10591067      }
    10601068    }
    1061     else
     1069    else if (list && list[0])
    10621070      ExecOnList(hwnd,
    10631071                 info->pszCmdLine,
    10641072                 flags, NULL, list, GetPString(IDS_EXECCMDTITLETEXT),
    10651073                 pszSrcFile, __LINE__);
     1074    else
     1075      return;
    10661076  }
    10671077  FreeList(list);
Note: See TracChangeset for help on using the changeset viewer.