mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-24 08:44:01 +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 fileNameFilter The name pattern to subset the list by, or null to return all files.
|
||||||
* @param context The holder of state information
|
* @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;
|
String parentPath = null;
|
||||||
if (parent != null) {
|
if (parent != null) {
|
||||||
|
@ -360,6 +360,13 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
} else {
|
} else {
|
||||||
parentPath = "/";
|
parentPath = "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!parent.canRead())
|
||||||
|
{
|
||||||
|
SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_FOLDER_UNREADABLE).makeSubstitution(parentPath);
|
||||||
|
throw new SystemMessageException(msg);
|
||||||
|
}
|
||||||
|
|
||||||
IHostFile[] results = null;
|
IHostFile[] results = null;
|
||||||
try
|
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 fileNameFilter The name pattern for subsetting the file list when this folder is subsequently expanded
|
||||||
* @param context The holder of state information
|
* @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;
|
String parentPath = null;
|
||||||
if (parent != null) {
|
if (parent != null) {
|
||||||
|
@ -389,6 +396,13 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
||||||
} else {
|
} else {
|
||||||
parentPath = "/";
|
parentPath = "/";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!parent.canRead())
|
||||||
|
{
|
||||||
|
SystemMessage msg = RSEUIPlugin.getPluginMessage(ISystemMessages.MSG_FOLDER_UNREADABLE).makeSubstitution(parentPath);
|
||||||
|
throw new SystemMessageException(msg);
|
||||||
|
}
|
||||||
|
|
||||||
IHostFile[] results = null;
|
IHostFile[] results = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue