Tk Library Source Code

View Ticket
Login
Ticket UUID: 1563137
Title: NList fails for files with spaces
Type: Bug Version: None
Submitter: keithv Created on: 2006-09-21 20:21:49
Subsystem: ftp Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2006-09-23 06:08:55
Resolution: Fixed Closed By: andreas_kupries
    Closed on: 2006-09-22 23:08:55
Description:
If you call ::ftp::NList and there is a file with
spaces, then NList returns each piece of the filename
as a separate file.

The problem is that a string result from the server is
passed as a list to lsort. Solution is to split the
line to convert it to a proper list.

Offending line:
  ftp.tcl, v1.39 #1164
     return [lsort $ftp(List)]

Solution:
 return [lsort [split [string trim $ftp(List) "\n"] "\n"]]
User Comments: andreas_kupries added on 2006-09-23 06:08:55:
Logged In: YES 
user_id=75003

Accepted this solution.
Committed.