Changeset 5062 for trunk/utils


Ignore:
Timestamp:
05/01/09 14:55:21 (11 years ago)
Author:
curtis
Message:

Fix problem with file paths starting with dot slash.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/utils/LineLength.java

    r4549 r5062  
    4444      // argument is a filename 
    4545      String dir; 
     46      String crap = "." + File.separator; 
     47      if (args[i].startsWith(crap)) args[i] = args[i].substring(crap.length()); 
    4648      int slash = args[i].lastIndexOf(File.separator); 
    4749      if (slash < 0) dir = "."; 
     
    124126    pathName = strip(pathName); 
    125127    return suffix ? 
    126       pathName.getName().endsWith(exp) : expFile.equals(pathName); 
     128      pathName.getName().endsWith(exp) : 
     129      expFile.getAbsoluteFile().equals(pathName.getAbsoluteFile()); 
    127130  } 
    128131 
Note: See TracChangeset for help on using the changeset viewer.