Project

General

Profile

« Previous | Next » 

Revision 4011

Added by berkley almost 16 years ago

fixed bug 3403

View differences:

src/edu/ucsb/nceas/metacat/MetaCatServlet.java
3001 3001
        // Get a reference to the file part of the form
3002 3002
        //FilePart filePart = (FilePart) fileList.get("datafile");
3003 3003
        String fileName = (String) fileList.get("filename");
3004
        System.out.println("filename: " + fileName);
3004 3005
        logMetacat.info("Uploading filename: " + fileName);
3005 3006
        // Check if the right file existed in the uploaded data
3006 3007
        if (fileName != null) 
......
3028 3029
              {
3029 3030
                newFile = new File(newFileName);
3030 3031
                fileExists = newFile.exists();
3031
                logMetacat.error("new file status is: " + fileExists);
3032
                logMetacat.info("new file status is: " + fileExists);
3033
                if(fileExists)
3034
                {
3035
                  newFile.delete();
3036
                  newFile.createNewFile();
3037
                  fileExists = false;
3038
                }
3039
                
3032 3040
                if ( fileExists == false ) 
3033 3041
                {
3034 3042
                    // copy file to desired output location
......
3153 3161
                        try {
3154 3162
                            newFile = new File(newFileName);
3155 3163
                            fileExists = newFile.exists();
3156
                            logMetacat.error("new file status is: " + fileExists);
3164
                            logMetacat.info("new file status is: " + fileExists);
3157 3165
                            if ( fileExists == false ) {
3158 3166
                                // copy file to desired output location
3159 3167
                                try {
src/edu/ucsb/nceas/metacat/PermissionController.java
642 642
    //if reach here, means there is no permssion record for given names and
643 643
    //docid. So throw a exception.
644 644

  
645
    throw new Exception("There is no permission record for user"+principals[0]+
646
                        "at document "+docId);
645
    throw new Exception("There is no permission record for user " + principals[0] +
646
                        " at document " + docId);
647 647

  
648 648
  }//isAllowFirst
649 649

  
src/edu/ucsb/nceas/metacat/DocumentImpl.java
1115 1115

  
1116 1116
                // Handle the NAMESPACE nodes
1117 1117
            } else if (currentNode.getNodeType().equals("NAMESPACE")) {
1118
                out.print(" xmlns:" + currentNode.getNodeName() + "=\""
1119
                        + currentNode.getNodeData() + "\"");
1118
                String nsprefix = " xmlns:";
1119
                if(currentNode.getNodeName() == null || currentNode.getNodeName().trim().equals(""))
1120
                {
1121
                  nsprefix = " xmlns";
1122
                }
1123
                
1124
                out.print(nsprefix + currentNode.getNodeName() + "=\""
1125
                          + currentNode.getNodeData() + "\"");
1120 1126

  
1121 1127
                // Handle the TEXT nodes
1122 1128
            } else if (currentNode.getNodeType().equals("TEXT")) {

Also available in: Unified diff