EvotecIT / Transferetto

Small PowerShell module with FTPS/SFTP functionality
MIT License
55 stars 14 forks source link

Set-FTPTracing throws an error #14

Closed pmarflee closed 2 years ago

pmarflee commented 2 years ago

Attempting to enable tracing throws an error:

PS C:\Windows\system32> set-ftptracing -enable
Unable to find type [FluentFTP.FtpTrace].
At C:\Program Files\WindowsPowerShell\Modules\Transferetto\0.0.11\Transferetto.psm1:963 char:20
+     if ($Enable) { [FluentFTP.FtpTrace]::EnableTracing = $true }
+                    ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (FluentFTP.FtpTrace:TypeName) [], RuntimeException
    + FullyQualifiedErrorId : TypeNotFound

Unable to find type [FluentFTP.FtpTrace].
At C:\Program Files\WindowsPowerShell\Modules\Transferetto\0.0.11\Transferetto.psm1:966 char:32
+     if (-not $HideFunctions) { [FluentFTP.FtpTrace]::LogFunctions = $ ...
+                                ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (FluentFTP.FtpTrace:TypeName) [], RuntimeException
    + FullyQualifiedErrorId : TypeNotFound

Unable to find type [FluentFTP.FtpTrace].
At C:\Program Files\WindowsPowerShell\Modules\Transferetto\0.0.11\Transferetto.psm1:970 char:25
+     if (-not $HideIP) { [FluentFTP.FtpTrace]::LogIP = $true }
+                         ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (FluentFTP.FtpTrace:TypeName) [], RuntimeException
    + FullyQualifiedErrorId : TypeNotFound

It looks as if the namespace used to reference the FtpTrace class is wrong. According to the FluentFTP source code, the fully qualified name for the class should be FluentFTP.Helpers.FtpTrace:

https://github.com/robinrodricks/FluentFTP/blob/01131bbd99a3c4dbb0f4dbf0281c4784c9eb3406/FluentFTP/Helpers/FtpTrace.cs

PrzemyslawKlys commented 2 years ago

I actually fixed it, but forgot to push to github. Now it should be fixed. Lemme publish new version

PrzemyslawKlys commented 2 years ago

Done.

pmarflee commented 2 years ago

Thanks. We'll get the latest version once it's available.