summaryrefslogtreecommitdiff
path: root/vfs/UVFSCore.pas
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2008-11-16 18:23:23 +0100
committerTomas Bzatek <tbzatek@users.sourceforge.net>2008-11-16 18:23:23 +0100
commit6212b2355152eeef10f3352276a41d5fbad77f6f (patch)
tree7c5694238403193de5c54b7c36491418fe1373f8 /vfs/UVFSCore.pas
parent10fe4e8b1aad19fbd0356cd3195c7fbaa812a5c7 (diff)
downloadtuxcmd-6212b2355152eeef10f3352276a41d5fbad77f6f.tar.xz
Nested VFS archiving engines supportv0.6.59
Diffstat (limited to 'vfs/UVFSCore.pas')
-rw-r--r--vfs/UVFSCore.pas5
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;