diff options
Diffstat (limited to 'vfs/UVFSCore.pas')
| -rw-r--r-- | vfs/UVFSCore.pas | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/vfs/UVFSCore.pas b/vfs/UVFSCore.pas index 270b240..7531e9c 100644 --- a/vfs/UVFSCore.pas +++ b/vfs/UVFSCore.pas @@ -92,6 +92,7 @@ type ArchiveMode: boolean; Password: string; PasswordUsed: boolean; + RemoveFileOnClose: string; constructor Create(SourcePlugin: TVFSPlugin); function VFSOpenURI(URI: string; AskQuestionCallback: PVFSAskQuestionCallback; AskPasswordCallback: PVFSAskPasswordCallback; ProgressCallback: PVFSProgressCallback; CallbackData: Pointer): boolean; function VFSOpenEx(OpenFile: string; AskQuestionCallback: PVFSAskQuestionCallback; AskPasswordCallback: PVFSAskPasswordCallback; ProgressCallback: PVFSProgressCallback; CallbackData: Pointer): TVFSResult; @@ -294,6 +295,7 @@ begin FGlobs := nil; Password := ''; PasswordUsed := False; + RemoveFileOnClose := ''; if @FSourcePlugin.FVFSNew <> nil then FGlobs := FSourcePlugin.FVFSNew(@VFSLogFunc); end; @@ -302,6 +304,9 @@ destructor TVFSEngine.Destroy; begin try if @FSourcePlugin.FVFSFree <> nil then FSourcePlugin.FVFSFree(FGlobs); + if Length(Trim(RemoveFileOnClose)) > 0 then + if unlink(PChar(RemoveFileOnClose)) <> 0 then + DebugMsg(['(EE) TVFSEngine.Destroy: error while removing ''', RemoveFileOnClose, ''': ', strerror(errno)]); except on E: Exception do DebugMsg(['*** TVFSEngine.Destroy() -Exception: ', E.Message]); end; |
