diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2008-11-16 18:23:23 +0100 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2008-11-16 18:23:23 +0100 |
| commit | 6212b2355152eeef10f3352276a41d5fbad77f6f (patch) | |
| tree | 7c5694238403193de5c54b7c36491418fe1373f8 /vfs/UVFSCore.pas | |
| parent | 10fe4e8b1aad19fbd0356cd3195c7fbaa812a5c7 (diff) | |
| download | tuxcmd-0.6.59.tar.xz | |
Nested VFS archiving engines supportv0.6.59
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; |
