[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    Bug#2422: kfm (kioslave) returns blank with WinNT ftp server
From:       Keith Refson <Keith.Refson () earth ! ox ! ac ! uk>
Date:       1999-12-14 19:05:02
[Download RAW message or body]

Package: kdebase
Version: 1.1.2
Program: kioslave

Platform: Solaris 7 (but bug is general)

When I attempted to access out Windows NT ftp server using kfm, the
screen was blank and showed no files.   Access from command-line ftp
was fine.

Further investigation revealed that this was caused by

1) kioslave tried to set the ftp server into "unix" ls -l listing mode 
   using the "site dirstyle" command.

2) The server is somehow ALREADY configured to give unix-style
   directory listings.

3) kioslave actually toggled it back to MS-DOS style, and hence could
   not parse the output.

Here's a patch which I have tested and demonstrated to work.  It just
checks the output and reverses its error if it made one.

*** kdebase-1.1.2/kfm/kioslave/ftp.cpp  Tue Dec 14 18:43:02 1999
--- kdebase-1.1.2/kfm/kioslave/ftp.cpp~ Thu May 20 19:50:43 1999
***************
*** 232,243 ****
          // Okay, we're logged in. If this is IIS 4, switch dir listing style t
o Unix:
          if( ftpSendCmd( "syst", '2' ) )
              if( !strncmp( rspbuf, "215 Windows_NT version", 22 ) ) // will do
for any version
!           {
!              ftpSendCmd( "site dirstyle", '2' );
!              if( !strncmp( rspbuf, "200 MSDOS-like directory output is off", 2
2 ) )//It was in Unix style already!
!                 ftpSendCmd( "site dirstyle", '2' );
!
!           }
          if( redirect == 0L )
              return 1;

--- 232,239 ----
          // Okay, we're logged in. If this is IIS 4, switch dir listing style t
o Unix:
          if( ftpSendCmd( "syst", '2' ) )
              if( !strncmp( rspbuf, "215 Windows_NT version", 22 ) ) // will do
for any version
!                 ftpSendCmd( "site dirstyle", '2' );

!
          if( redirect == 0L )
              return 1;                 

------------------------

sincerely

Keith Refson

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic