gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject cvs commit: jakarta-gump/python/gump/document forrest.py
Date Tue, 24 Feb 2004 22:49:10 GMT
ajack       2004/02/24 14:49:10

  Modified:    python/gump/document forrest.py
  Log:
  Opps, use abs/joined full path (not just file name)
  
  Revision  Changes    Path
  1.84      +7 -5      jakarta-gump/python/gump/document/forrest.py
  
  Index: forrest.py
  ===================================================================
  RCS file: /home/cvs/jakarta-gump/python/gump/document/forrest.py,v
  retrieving revision 1.83
  retrieving revision 1.84
  diff -u -r1.83 -r1.84
  --- forrest.py	24 Feb 2004 22:14:49 -0000	1.83
  +++ forrest.py	24 Feb 2004 22:49:10 -0000	1.84
  @@ -1664,17 +1664,19 @@
                   files=os.listdir(directory)
                   files.sort()
                   for file in files:
  +                    
  +                    filePath=os.path.abspath(os.path.join(directory,file))
                       listingRow=listingTable.createRow()
                       
                       #
                       listingRow.createData(file)    
                       
  -                    if os.path.isdir(file):
  +                    if os.path.isdir(filePath):
                           listingRow.createData('Directory')
                           listingRow.createData('N/A')
                       else:
                           listingRow.createData('File')    
  -                        listingRow.createData(str(os.path.getsize(file)))             
                                  
  +                        listingRow.createData(str(os.path.getsize(filePath)))         
                                      
               else:    
                   #
                   # Show the content...
  
  
  

Mime
View raw message