mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-22 15:53:58 +02:00
[251860] Rename a file/folder to a hidden file causes problems
This commit is contained in:
parent
532a076d3f
commit
1f181fa578
1 changed files with 7 additions and 4 deletions
|
@ -57,6 +57,7 @@
|
||||||
* David Dykstal (IBM) [230821] fix IRemoteFileSubSystem API to be consistent with IFileService
|
* David Dykstal (IBM) [230821] fix IRemoteFileSubSystem API to be consistent with IFileService
|
||||||
* Anna Dushistova (MontaVista) - [226550] [api] Launch Shell and Launch Terminal actions should be contributed declaratively
|
* Anna Dushistova (MontaVista) - [226550] [api] Launch Shell and Launch Terminal actions should be contributed declaratively
|
||||||
* Martin Oberhuber (Wind River) - [234215] improve API documentation for doDelete and doDeleteBatch
|
* Martin Oberhuber (Wind River) - [234215] improve API documentation for doDelete and doDeleteBatch
|
||||||
|
* David McKnight (IBM) - [251860] Rename a file/folder to a hidden file causes problems
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.files.ui.view;
|
package org.eclipse.rse.internal.files.ui.view;
|
||||||
|
@ -3205,16 +3206,18 @@ public class SystemViewRemoteFileAdapter
|
||||||
* @return an array of all file and folder names in the parent of the given IRemoteFile object
|
* @return an array of all file and folder names in the parent of the given IRemoteFile object
|
||||||
*/
|
*/
|
||||||
public String[] getRemoteParentNamesInUse(Object element, IProgressMonitor monitor) throws Exception
|
public String[] getRemoteParentNamesInUse(Object element, IProgressMonitor monitor) throws Exception
|
||||||
{
|
{ String[] names = EMPTY_STRING_LIST;
|
||||||
String[] names = EMPTY_STRING_LIST;
|
|
||||||
|
|
||||||
IRemoteFile file = (IRemoteFile) element;
|
IRemoteFile file = (IRemoteFile) element;
|
||||||
String parentName = file.getParentPath();
|
String parentName = file.getParentPath();
|
||||||
if (parentName == null) // given a root?
|
if (parentName == null) // given a root?
|
||||||
return names; // not much we can do. Should never happen: you can't rename a root!
|
return names; // not much we can do. Should never happen: you can't rename a root!
|
||||||
|
|
||||||
// DKM - changed this so that we can take advantage of caching
|
// changed to do the same as the new file wizards since
|
||||||
Object[] children = getChildren(file.getParentRemoteFile());
|
// as per bug 251860, we can't use the cache and we need to bypass the hidden preference
|
||||||
|
IRemoteFile parentFolder = file.getParentRemoteFile();
|
||||||
|
IRemoteFile[] children = parentFolder.getParentRemoteFileSubSystem().list(parentFolder, null);
|
||||||
|
|
||||||
if ((children == null) || (children.length == 0))
|
if ((children == null) || (children.length == 0))
|
||||||
return names;
|
return names;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue