【问题标题】:SharpSSH's Scp object can't copy files bigger than 2GBSharpSSH 的 Scp 对象无法复制大于 2GB 的文件
【发布时间】:2011-04-08 00:36:16
【问题描述】:

每当我尝试复制大于 2GB 的文件时,都会在 Get 方法中得到数组索引越界异常:

Scp myScp = new Scp("remotehost", "joe", "mypassword");
myScp.OnTransferProgress += new FileTransferEvent(scpProg);
myScp.Connect(22);
myScp.Get("/home/joe/bigfile.bin", "/tmp/bigfile.bin");
myScp.Close();

【问题讨论】:

    标签: c# .net scp sharpssh


    【解决方案1】:

    ...我通过修补 SharpSSH 在战略位置用 Int64 替换 int 解决了这个问题。 Here's the patch.

    【讨论】:

    • 我开始在bitbucket.org/mattgwagner/sharpssh 添加一些我需要的东西到 SharpSSH 上,我将尝试包含你的补丁。
    • 请告诉我你让它在 .NET 4.0 中运行!当我在 .NET 4 下编译 Tamir 的代码时,我在主机解析中遇到了一些奇怪的错误。它仅适用于 .NET 3.5。
    • 这绝对不是最流畅的体验,异常处理也很糟糕,但至少这是一个起点!
    猜你喜欢
    • 2013-10-19
    • 2011-07-06
    • 1970-01-01
    • 1970-01-01
    • 2013-02-19
    • 1970-01-01
    • 1970-01-01
    • 2014-11-13
    • 2016-05-23
    相关资源
    最近更新 更多