path.join error with paramiko/paramiko_scp on get_r("/")

Bug #981498 reported by DipSwitch
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
paramiko
New
Undecided
Unassigned

Bug Description

When you call scp.get_r("/") the line below would generate an error.

paramiko/paramiko_scp:~364 change :

        try:
            mode = int(parts[0], 8)
            path = os.path.join(self._recv_dir, parts[2])
        except:
            self.channel.send('\x01')

To:

        try:
            mode = int(parts[0], 8)
            if (len(parts) >= 3):
                path = os.path.join(self._recv_dir, parts[2])
            else:
                path = self._recv_dir;
        except:
            self.channel.send('\x01')

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.