Project: Eclipse_Platform_UI
Bug 371415 Infinite recursion when performing recursive copy of eclipse folders using custom FileStore implementation
Reported: 2012-02-13 14:38:17 | Status: resolved fixed

The CopyFilesAndFoldersOperation has a special validateImportDestinationInternal() method to detect cases where the user copy/pastes a file tree inside itself and produces an error. However, when a custom FileStore implementation is providing the workspace resources the check fails to detect the cycle and produces an infinite recursion and a very deep resource tree as a result. The method relies on equals(), which returns false because MyFileStore is not a LocalFileStore. Perhaps the IFileStore.toURI() should be used instead to equate the URI's of the file stores? Also, maybe the sourceStore should be an instance of MyFileStore instead of LocalFileStore? My file system is providing all of the file stores for the workspace so it is strange that it uses the LocalFileStore implementation for the comparison.

Files changed in fix:
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/dialogs/IDEResourceInfoUtils.java