/// <exception cref="NGit.Errors.TransportException"></exception> internal SftpObjectDB(TransportSftp _enclosing, string path) { this._enclosing = _enclosing; if (path.StartsWith("/~")) { path = Sharpen.Runtime.Substring(path, 1); } if (path.StartsWith("~/")) { path = Sharpen.Runtime.Substring(path, 2); } try { this.ftp = this._enclosing.NewSftp(); this.ftp.Cd(path); this.ftp.Cd("objects"); this.objectsPath = this.ftp.Pwd(); } catch (TransportException err) { this.Close(); throw; } catch (SftpException je) { throw new TransportException("Can't enter " + path + "/objects" + ": " + je.Message , je); } }
/// <exception cref="NGit.Errors.TransportException"></exception> internal SftpObjectDB(TransportSftp _enclosing, TransportSftp.SftpObjectDB parent , string p) { this._enclosing = _enclosing; try { this.ftp = this._enclosing.NewSftp(); this.ftp.Cd(parent.objectsPath); this.ftp.Cd(p); this.objectsPath = this.ftp.Pwd(); } catch (TransportException err) { this.Close(); throw; } catch (SftpException je) { throw new TransportException("Can't enter " + p + " from " + parent.objectsPath + ": " + je.Message, je); } }