Revision 110:656895a37617

b/java/jgsscli/src/jgsscli/commands/GSSCmd.java
32 32
*/
33 33
package jgsscli.commands;
34 34

  
35
import java.io.File;
36 35
import java.util.Date;
37 36
import java.util.Map;
38 37
import java.util.TreeMap;
......
240 239
        StatusCode statusCode = StatusCode.OK;
241 240
        /* Get the parent directory in the pattern */
242 241
        String[] parts = 
243
            pattern.split(".*" + "(?<!\\\\)" + GSSUtils.GSS_FILEPATH_SEPARATOR);
244
        String parent = parts[0];
245
        String namePattern = parts[1];
242
            pattern.split(GSSUtils.GSS_FILEPATH_SEPARATOR);
243
            //pattern.split("(?<!\\\\)" + GSSUtils.GSS_FILEPATH_SEPARATOR);
244
        String parent = parts[parts.length - 2];
245
        String namePattern = parts[parts.length - 1];
246 246
        /* If there is no parent we are at the user's root directory, which
247 247
         * we will treat as parent; as the root directory is added in the 
248 248
         * method calls, we let parent be the empty string.
249 249
         */
250 250
        if (parent == null || parent.isEmpty()) {
251 251
            parent = GSSUtils.GSS_FILEPATH_SEPARATOR;
252
        } 
252
        }
253
        this.log.debug("Parent is: " + parent);
254
        this.log.debug("Name is: " + namePattern);
253 255
        MethodContext methodContext = new MethodContext(this.methodContext);
254 256
        methodContext.setRemotePathEncoded(parent);
255 257
        DirQuery dirQuery = readDir(methodContext);

Also available in: Unified diff