private void extractFileAndCheckoutInfo()

in src/com/intellij/vssSupport/commands/DirectoryCommandListener.java [128:167]


  private void extractFileAndCheckoutInfo( String lastFolderName, String line )
  {
    String fileName = null;
    String userName = VssConfiguration.getInstance( project ).USER_NAME.toLowerCase();

    //  If the user name is specified (in the configuration), try to find it in
    //  the input line. If present, then the file belongs to the checkout list
    //  of the current user. Otherwise it is a valid file which needs to be
    //  extracted from this mess.
    if( line.length() > 20 && line.charAt( 19 ) == ' ' )
    {
      fileName = line.substring( 0, 19 ).trim();
      boolean fileIsCut = (fileName.length() == 19);

      if( fileName.indexOf( '\\' ) == -1 ) //  avoid broken paths with blanks inside
      {
        fileName = lastFolderName + "\\" + fileName;

        //  File name might be truncated if its lenght is exactly 19 symbols.
        if( fileIsCut )
          fileName = completeFileName( fileName );

        if( StringUtil.isNotEmpty( userName ) && hasLoginName( line, userName ) )
        {
          fileName = VssUtil.getCanonicalLocalPath( fileName ).toLowerCase();
          filesCheckedOut.add( fileName );
        }
      }
    }
    else if( line.indexOf( '\\' ) == -1 )
    {
      fileName = lastFolderName + "\\" + line;
    }

    if( fileName != null )
    {
      fileName = VssUtil.getCanonicalLocalPath( fileName ).toLowerCase();
      filesInProject.add( fileName );
    }
  }