michaellukashov / Far-NetBox

SFTP/SCP/FTP/FTPS/WebDAV/S3 client for Far Manager 3 (http://farmanager.com/)
https://forum.farmanager.com/viewtopic.php?t=6317
GNU General Public License v2.0
157 stars 52 forks source link

Problems with session names that contain spaces #290

Open bisubus opened 5 years ago

bisubus commented 5 years ago

After the update from 2.1.31 to 2.4.5 sessions with non-alphanumeric names became corrupted. Session details are empty, corrupted sessions can be edited but cannot be be deleted.

On a closer look, session names became percent encoded at some point:

<key name="Sessions">
    <key name="foo bar">
        <value name="CodePage" type="text" value=""/>
        <value name="FSProtocol" type="text" value="FTP"/>
        <value name="HostName" type="text" value="..."/>
        <value name="LoginType" type="qword" value="0000000000000001"/>
        <value name="LookupUserGroups2" type="qword" value="0000000000000000"/>
        <value name="Password" type="text" value="..."/>
        <value name="PingType" type="qword" value="0000000000000002"/>
        <value name="PortNumber" type="qword" value="0000000000000015"/>
        <value name="UpdateDirectories" type="qword" value="0000000000000000"/>
        <value name="UserName" type="text" value="..."/>
        <value name="Version" type="text" value="2.1.31"/>
    </key>
    <key name="foo%20bar">
        <value name="FSProtocol" type="text" value="SFTP%20(SCP)"/>
        <value name="Version" type="text" value="2.4.5"/>
    </key>

A supposed manual fix is to export the config:

Far /export cfg.farconfig

Rename old entries with URL-encoded names and remove dupe new entries. And import it:

del <...>\PluginsData\42E4AEB1-A230-44F4-B33C-F195BB654931.db
Far /import cfg.farconfig
VictorVG commented 5 years ago
  1. Use Sift-F6 for rename session in to NetBox panel.
  2. Old BD not compatible in to v2.4.3 or newer.