View | Details | Raw Unified | Return to bug 192724 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/rse/internal/services/ssh/files/SftpFileService.java (-1 / +2 lines)
Lines 307-313 Link Here
307
			    			//don't show the trivial names
307
			    			//don't show the trivial names
308
			    			continue;
308
			    			continue;
309
			    		}
309
			    		}
310
			    		if (filematcher.matches(fileName) || lsEntry.getAttrs().isDir()) {
310
			    		if (filematcher.matches(fileName) || (lsEntry.getAttrs().isDir() && fileType!=FILE_TYPE_FOLDERS)) {
311
							//get ALL directory names (unless looking for folders only)
311
			    			SftpHostFile node = makeHostFile(parentPath, fileName, lsEntry.getAttrs());
312
			    			SftpHostFile node = makeHostFile(parentPath, fileName, lsEntry.getAttrs());
312
			    			if (isRightType(fileType, node)) {
313
			    			if (isRightType(fileType, node)) {
313
			    				results.add(node);
314
			    				results.add(node);
(-)src/org/eclipse/rse/internal/services/files/ftp/FTPService.java (-20 / +11 lines)
Lines 497-522 Link Here
497
				for(int i=0; i<_ftpFiles.length; i++)
497
				for(int i=0; i<_ftpFiles.length; i++)
498
				{
498
				{
499
					FTPHostFile f = new FTPHostFile(parentPath, _ftpFiles[i]);
499
					FTPHostFile f = new FTPHostFile(parentPath, _ftpFiles[i]);
500
	
500
					if (isRightType(fileType,f)) {
501
					if((filematcher.matches(f.getName()) || f.isDirectory()) && !(f.getName().equals(".") || f.getName().equals(".."))) //$NON-NLS-1$ //$NON-NLS-2$
501
						String name = f.getName();
502
					{
502
						if (name.equals(".") || name.equals("..")) { //$NON-NLS-1$ //$NON-NLS-2$
503
						switch(fileType)
503
							//Never return the default directory names
504
						{
504
							continue;
505
							case FILE_TYPE_FOLDERS:
505
						} else if (f.isDirectory() && fileType!=FILE_TYPE_FOLDERS) {
506
								if(f.isDirectory())
506
							//get ALL directory names (unless looking for folders only)
507
								{
507
							results.add(f);
508
									results.add(f);	
508
						} else if (filematcher.matches(name)) { 
509
								}
509
							//filter all others by name.
510
								break;
510
							results.add(f);
511
							case FILE_TYPE_FILES:
512
								if(f.isFile())
513
								{
514
									results.add(f);	
515
								}
516
								break;
517
							case FILE_TYPE_FILES_AND_FOLDERS:
518
								results.add(f);	
519
								break;
520
						}
511
						}
521
					}
512
					}
522
				}
513
				}

Return to bug 192724