Changeset 1750 for trunk/dll/pathutil.c
- Timestamp:
- Mar 1, 2014, 2:55:57 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/pathutil.c
r1699 r1750 19 19 23 Oct 10 GKY Add ForwardslashToBackslash function to streamline code 20 20 17 Sep 11 GKY Fix commandline quoting issues 21 01 Mar 14 JBS Ticket #524: Made "searchapath" thread-safe. Function names and signatures were changed. 22 So calls to these functions had to be changed. 21 23 22 24 ***********************************************************************/ … … 33 35 #include "init.h" // Data declaration(s) 34 36 #include "fm3str.h" 35 #include "srchpath.h" // searchapath37 #include "srchpath.h" // Search*Path*ForFile 36 38 #include "pathutil.h" 37 39 #include "strips.h" // remove_first_occurence_of_character … … 157 159 ULONG ulAppType; 158 160 char *pszChar; 159 char *FullPath;160 161 PSZ pszNewCmdLine = pszWorkBuf; 161 162 … … 210 211 pszCmdLine_); 211 212 if (!offsetexe && !offsetcom) { 212 FullPath = searchapath(PCSZ_PATH, szCmdLine); 213 if (*FullPath) 214 ret = 0; 213 if (!SearchPathForFile(PCSZ_PATH, szCmdLine, NULL)) 214 ret = 0; 215 215 } 216 216 else … … 257 257 *offset = 0; 258 258 strcat(szCmdLine, PCSZ_DOTCMD); 259 FullPath = searchapath(PCSZ_PATH, szCmdLine); 260 if (*FullPath) 259 if (!SearchPathForFile(PCSZ_PATH, szCmdLine, NULL)) 261 260 ret = 0; 262 261 else { 263 262 *offset = 0; 264 263 strcat(szCmdLine, PCSZ_DOTBAT); 265 FullPath = searchapath(PCSZ_PATH, szCmdLine); 266 if (*FullPath) 264 if (!SearchPathForFile(PCSZ_PATH, szCmdLine, NULL)) 267 265 ret = 0; 268 266 else { 269 267 *offset = 0; 270 268 strcat(szCmdLine, PCSZ_DOTBTM); 271 FullPath = searchapath(PCSZ_PATH, szCmdLine); 272 if (*FullPath) 269 if (!SearchPathForFile(PCSZ_PATH, szCmdLine, NULL)) 273 270 ret = 0; 274 271 } … … 296 293 *offset = 0; 297 294 strcat(szCmdLine, PCSZ_DOTCMD); 298 FullPath = searchapath(PCSZ_PATH, szCmdLine); 299 if (*FullPath) { 295 if (!SearchPathForFile(PCSZ_PATH, szCmdLine, NULL)) { 300 296 ret = 0; 301 297 break; … … 304 300 *offset = 0; 305 301 strcat(szCmdLine, PCSZ_DOTBAT); 306 FullPath = searchapath(PCSZ_PATH, szCmdLine); 307 if (*FullPath) { 302 if (!SearchPathForFile(PCSZ_PATH, szCmdLine, NULL)) { 308 303 ret = 0; 309 304 break; … … 312 307 *offset = 0; 313 308 strcat(szCmdLine, PCSZ_DOTBTM); 314 FullPath = searchapath(PCSZ_PATH, szCmdLine); 315 if (*FullPath) { 309 if (!SearchPathForFile(PCSZ_PATH, szCmdLine, NULL)) { 316 310 ret = 0; 317 311 break; … … 372 366 GetPString(IDS_QUOTESINARGSTEXT), 373 367 pszCmdLine_); 374 FullPath = searchapath(PCSZ_PATH, szCmdLine);375 368 BldQuotedFileName(pszNewCmdLine, szCmdLine); 376 if ( !*FullPath) {369 if (SearchPathForFile(PCSZ_PATH, szCmdLine, NULL)) { 377 370 ret = saymsg(MB_YESNO, 378 371 HWND_DESKTOP,
Note:
See TracChangeset
for help on using the changeset viewer.