Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide Temp Files #191 #225

Merged
merged 1 commit into from
May 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 23 additions & 10 deletions src/MainUtils.pas
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ interface
MSVISIO = 4;


DOCTO_VERSION = '1.14.44'; // dont use 0x - choco needs incrementing versions.
DOCTO_VERSION_NOTE = ' x64 Release ';
DOCTO_VERSION = '1.15.45'; // dont use 0x - choco needs incrementing versions.
DOCTO_VERSION_NOTE = ' x32 Release ABC';
type


Expand Down Expand Up @@ -240,14 +240,14 @@ TDocumentConverter = class
procedure Log(Msg: String; Level : Integer = ERRORS); overload;

procedure Log(Msg: String; List: TStrings; Level: Integer); overload;
procedure LogInfo(Msg: String; Level : Integer = ERRORS);
procedure LogDebug(Msg: String; Level : Integer = ERRORS);
procedure LogInfo(Msg: String; Level : Integer = ERRORS);
procedure LogDebug(Msg: String; Level : Integer = ERRORS);
procedure LogError(Msg: String);
function ConvertErrorText(Msg: String) : String;
function CallWebHook(Params: String) : string;
FUNCTION AfterConversion(InputFile, OutputFile: String):string;
Function OnConversionError(InputFile, OutputFile, Error: String):string;

Procedure LoadFileList();

procedure LogResourceHelp(HelpResName : String);
procedure LogVersionInfo(ForceReload : boolean = true);
Expand Down Expand Up @@ -1363,7 +1363,17 @@ procedure TDocumentConverter.LoadConfig(Params: TStrings);

// Code to run when all parameters have been loaded.
// Get Files
LoadFileList;



end;



procedure TDocumentConverter.LoadFileList;
var f : integer;
begin
// IsFileInput := true;
// If input is Dir rather than file, enumerate files.
if DirectoryExists(InputFile) then
Expand All @@ -1378,18 +1388,21 @@ procedure TDocumentConverter.LoadConfig(Params: TStrings);
end;
log('File List', FInputFiles,STANDARD);
logInfo('Beginning to convert files....',STANDARD);

// remove temp files
for f := 0 to FInputFiles.Count -1 do
begin
HaltWithError(204, 'No File Matches in Input Directory: ' + finputfile + '*' + InputExtension );

end;

end
else
begin
InputIsFile := true;
end;



end;



procedure TDocumentConverter.Log(Msg: String; Level : Integer = ERRORS );
var
OutputLog, OutputTimeStamp : Boolean;
Expand Down