TMP files are not being cleaned up after Session is closed

Advertisement

gschmidt34
Joined:
Posts:
2
Location:
United States

TMP files are not being cleaned up after Session is closed

Every time a Session is opened a .tmp file is created in the c:\windows\temp directory, but these files are not getting removed when the Session is destroyed - even if explicitly called Session.dispose();

Is there an option for this? Or how should it be handled?

Reply with quote

Advertisement

ted1001
Joined:
Posts:
4

gschmidt34 wrote:

I downloaded the latest release and the issue appears to be resolved.

I just downloaded the latest version.
tmp-files are not deleted after running dispose.

Winscp.exe 5.0.7.2268
Winscp.dll 5.0.7.0 (file version 1.0.0.528)

Reply with quote E-mail

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

ted1001 wrote:

I just downloaded the latest version.
tmp-files are not deleted after running dispose.
Old ones or new ones? The olds one are not. You need to delete them manually. But the new ones should be deleted.
_________________
Martin Prikryl

Reply with quote

ted1001
Joined:
Posts:
4

martin wrote:

ted1001 wrote:

I just downloaded the latest version.
tmp-files are not deleted after running dispose.
Old ones or new ones? The olds one are not. You need to delete them manually. But the new ones should be deleted.

The new ones are not deleted. Triggering it from Powershell like this:

$sessionOptions = New-Object WinSCP.SessionOptions
$sessionOptions.Protocol = [WinSCP.Protocol]::Sftp
$sessionOptions.HostName = "---------REMOVED--------"
$sessionOptions.UserName = "---------REMOVED--------"
$sessionOptions.Password = "---------REMOVED--------"
$sessionOptions.SshHostKey = "ssh-rsa 1024 ---------REMOVED--------"
$session = New-Object WinSCP.Session
$session.ExecutablePath = $winscpPath
$session.DisableVersionCheck = "true"



Example of the content of a tmp-file not deleted:
<?xml version="1.0" encoding="UTF-8"?>
<session xmlns="https://winscp.net/schema/session/1.0" name="---------REMOVED--------" start="2012-05-24T08:22:55.320Z">
<group name="open -hostkey=&quot;ssh-rsa 1024 ---------REMOVED--------&quot; -timeout=15 &quot;sftp://---------REMOVED--------5&quot;" start="2012-05-24T08:22:55.711Z">
</group>
<group name="stat -- &quot;./files/lmsdeploy/---------REMOVED--------/uploadcompleted.true&quot;" start="2012-05-24T08:22:55.758Z">
<stat>
<filename value="/files/lmsdeploy/Atlantic/uploadcompleted.true" />
<result success="false">
<message>Can't get attributes of file './files/lmsdeploy/Atlantic/uploadcompleted.true'.</message>
<message>No such file or directory.
Error code: 2
Error message from server: No such file
Request code: 7</message>
</result>
</stat>
<failure>
<message>Can't get attributes of file './files/lmsdeploy/---------REMOVED--------/uploadcompleted.true'.</message>
<message>No such file or directory.
Error code: 2
Error message from server: No such file
Request code: 7</message>
</failure>
</group>
<group name="exit" start="2012-05-24T08:22:55.883Z">
</group>
</session>

Reply with quote E-mail

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

ted1001 wrote:

The new ones are not deleted. Triggering it from Powershell like this:
Thanks for your report.
I will contact you shortly.
_________________
Martin Prikryl

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

ted1001 wrote:

The new ones are not deleted. Triggering it from Powershell like this:
I have sent you an email with a development version of WinSCP to address you have used to register on this forum.

Reply with quote

gunnerit
Joined:
Posts:
2
Location:
Ha Noi - Viet Nam

So that how to resoled this problem. I also have this issue.
I create a service run on Win2k8 Server.

Reply with quote

zaus
Joined:
Posts:
1

Still not cleaning up...

Only for me, these are in the application directory (same folder as the WinSCP.dll/exe).

Where do these come from?

I'm using the Nuget package (product version 5.7.6, file version 1.2.10.5874)

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: Still not cleaning up...

zaus wrote:

Only for me, these are in the application directory (same folder as the WinSCP.dll/exe).

Where do these come from?

I'm using the Nuget package (product version 5.7.6, file version 1.2.10.5874)
Which "these"? Please start a new thread and describe your problem in details, including a debug log (Session.DebugLogPath).
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum