diff --git a/sourcepawn/batchtool/compile.dpr b/sourcepawn/batchtool/compile.dpr index a395c37f..25bdbfe4 100644 --- a/sourcepawn/batchtool/compile.dpr +++ b/sourcepawn/batchtool/compile.dpr @@ -56,8 +56,12 @@ begin cfg := TIniFile.Create(ExtractFilePath(ParamStr(0)) + 'compiler.ini'); outdir := cfg.ReadString('Main', 'Output', ''); - if (outdir <> '') and (DirectoryExists(outdir)) then - outdir := IncludeTrailingPathDelimiter(outdir) + if (outdir <> '') then begin + if (DirectoryExists(outdir)) then + outdir := IncludeTrailingPathDelimiter(outdir) + else if (DirectoryExists(ExtractFilePath(ParamStr(0)) + outdir)) then + outdir := ExtractFilePath(ParamStr(0)) + IncludeTrailingPathDelimiter(outdir); + end else outdir := ''; cfg.Free; diff --git a/sourcepawn/batchtool/compile.exe b/sourcepawn/batchtool/compile.exe index 22f1ebb5..5cfa7174 100644 Binary files a/sourcepawn/batchtool/compile.exe and b/sourcepawn/batchtool/compile.exe differ