diff --git a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java index ea52759364a..4afbe7ede6a 100644 --- a/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java +++ b/rse/plugins/org.eclipse.rse.services.dstore/src/org/eclipse/rse/internal/services/dstore/files/DStoreFileService.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2012 IBM Corporation and others. + * Copyright (c) 2006, 2014 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -68,6 +68,7 @@ * David McKnight (IBM) - [390037] [dstore] Duplicated items in the System view * David McKnight (IBM) - [391164] [dstore] don't clear cached elements when they're not spirited or deleted * David McKnight (IBM) - [396783] [dstore] fix issues with the spiriting mechanism and other memory improvements (phase 2) + * David McKnight (IBM) - [427306] A couple cases where RSE doesn't indicate lack of space for upload *******************************************************************************/ package org.eclipse.rse.internal.services.dstore.files; @@ -643,6 +644,13 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer }); monitor.subTask(str); isCancelled = monitor.isCanceled(); + + String resultStr = result.getSource(); + if (resultStr.equals("failed")){ //$NON-NLS-1$ + String msgTxt = NLS.bind(ServiceResources.FILEMSG_COPY_FILE_FAILED, remotePath); + SystemMessage msg = new SimpleSystemMessage(Activator.PLUGIN_ID, IStatus.ERROR, msgTxt); + throw new SystemMessageException(msg); + } } available = bufInputStream.available(); @@ -694,7 +702,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer // UniversalSystemPlugin.logError(CLASSNAME + "." + "copy: " + "error writing file " + remotePath, e); throw new RemoteFileIOException(e); } - + } if (isCancelled) { throw new SystemOperationCancelledException(); @@ -731,9 +739,7 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer throw new SystemMessageException(msg); } } - - } } } } diff --git a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalFileService.java b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalFileService.java index 33ade1cbd05..e388e3ad7d3 100644 --- a/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalFileService.java +++ b/rse/plugins/org.eclipse.rse.services.local/src/org/eclipse/rse/internal/services/local/files/LocalFileService.java @@ -55,6 +55,7 @@ * Samuel Wu (IBM) - [395981] Local file encoding is not handled properly * David McKnight (IBM) - [422508] Unable to map A:\ and B:\ as selectable drives in RSE View * David McKnight (IBM) - [420798] Slow performances in RDz 9.0 with opening 7000 files located on a network driver. + * David McKnight (IBM) - [427306] A couple cases where RSE doesn't indicate lack of space for upload *******************************************************************************/ package org.eclipse.rse.internal.services.local.files; @@ -676,12 +677,18 @@ public class LocalFileService extends AbstractFileService implements ILocalServi } catch (FileNotFoundException e) { + destinationFile.delete(); + throw new RemoteFileIOException(e); } catch (UnsupportedEncodingException e) { + destinationFile.delete(); + throw new RemoteFileIOException(e); } catch (IOException e) { + destinationFile.delete(); + throw new RemoteFileIOException(e); } finally {