mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 17:35:35 +02:00
fixes for 154302 - relaying exceptions back from fetch operations
This commit is contained in:
parent
3479b29549
commit
aa98dd9091
1 changed files with 16 additions and 2 deletions
|
@ -352,7 +352,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
|||
* @param fileNameFilter The name pattern to subset the list by, or null to return all files.
|
||||
* @param context The holder of state information
|
||||
*/
|
||||
public IRemoteFile[] listFiles(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context)
|
||||
public IRemoteFile[] listFiles(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context) throws SystemMessageException
|
||||
{
|
||||
String parentPath = null;
|
||||
if (parent != null) {
|
||||
|
@ -360,6 +360,13 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
|||
} else {
|
||||
parentPath = "/";
|
||||
}
|
||||
|
||||
if (!parent.canRead())
|
||||
{
|
||||
SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_FOLDER_UNREADABLE).makeSubstitution(parentPath);
|
||||
throw new SystemMessageException(msg);
|
||||
}
|
||||
|
||||
IHostFile[] results = null;
|
||||
try
|
||||
{
|
||||
|
@ -381,7 +388,7 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
|||
* @param fileNameFilter The name pattern for subsetting the file list when this folder is subsequently expanded
|
||||
* @param context The holder of state information
|
||||
*/
|
||||
public IRemoteFile[] listFolders(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context)
|
||||
public IRemoteFile[] listFolders(IRemoteFile parent, String fileNameFilter, IRemoteFileContext context) throws SystemMessageException
|
||||
{
|
||||
String parentPath = null;
|
||||
if (parent != null) {
|
||||
|
@ -389,6 +396,13 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
|||
} else {
|
||||
parentPath = "/";
|
||||
}
|
||||
|
||||
if (!parent.canRead())
|
||||
{
|
||||
SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_FOLDER_UNREADABLE).makeSubstitution(parentPath);
|
||||
throw new SystemMessageException(msg);
|
||||
}
|
||||
|
||||
IHostFile[] results = null;
|
||||
try
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue