Changeset 3568
- Timestamp:
- Jul 9, 2022, 3:24:31 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kash/exec.c
r3480 r3568 235 235 memcpy(cmdname, argv0, argv0len); 236 236 memcpy(cmdname + argv0len, g_exe_suffixes[suffix], sufflen + 1); 237 tryexec(psh, cmdname, argv, envp, 1); 237 238 } else 238 239 #endif … … 240 241 cmdname = stalloc(psh, argv0len + 5); 241 242 memcpy(cmdname, argv0, argv0len + 1); 242 }243 tryexec(psh, cmdname, argv, envp, has_ext);243 tryexec(psh, cmdname, argv, envp, has_ext); 244 } 244 245 TRACE((psh, "shellexec: cmdname=%s\n", cmdname)); 245 246 stunalloc(psh, cmdname); … … 263 264 if (--idx < 0 && psh->pathopt == NULL) { 264 265 #ifdef PC_EXE_EXTS 265 if (!has_ext && idx == -1 && suffix && (unsigned)suffix < K_ELEMENTS(g_exe_suffixes)) 266 if (!has_ext && idx == -1 && suffix && (unsigned)suffix < K_ELEMENTS(g_exe_suffixes)) { 266 267 strcat(cmdname, g_exe_suffixes[suffix]); 267 #endif 268 tryexec(psh, cmdname, argv, envp, has_ext); 268 tryexec(psh, cmdname, argv, envp, 1); 269 } else 270 #endif 271 tryexec(psh, cmdname, argv, envp, has_ext); 269 272 if (errno != ENOENT && errno != ENOTDIR) 270 273 e = errno; … … 305 308 if (!has_ext) { 306 309 int suffix; 307 int isreg = stat_pc_exec_exts(psh, cmd, 0, &suffix); 308 kHlpAssert(isreg > 0); 310 stat_pc_exec_exts(psh, cmd, 0, &suffix); 309 311 } 310 312 #endif
Note:
See TracChangeset
for help on using the changeset viewer.