|
Lines 1-5
Link Here
|
| 1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2007, 2008 IBM Corporation and others. |
2 |
* Copyright (c) 2007, 2009 IBM Corporation and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
|
Lines 12-17
Link Here
|
| 12 |
* Contributors: |
12 |
* Contributors: |
| 13 |
* Xuan Chen (IBM) - [209827] Update DStore command implementation to enable cancelation of archive operations |
13 |
* Xuan Chen (IBM) - [209827] Update DStore command implementation to enable cancelation of archive operations |
| 14 |
* Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients |
14 |
* Noriaki Takatsu (IBM) - [220126] [dstore][api][breaking] Single process server for multiple clients |
|
|
15 |
* David McKnight (IBM) - [290290] [dstore] Error message when copy a file from another users folder |
| 15 |
*******************************************************************************/ |
16 |
*******************************************************************************/ |
| 16 |
package org.eclipse.rse.internal.dstore.universal.miners.filesystem; |
17 |
package org.eclipse.rse.internal.dstore.universal.miners.filesystem; |
| 17 |
|
18 |
|
|
Lines 200-205
Link Here
|
| 200 |
err = err.substring(0, err.length() - newLine.length()); |
201 |
err = err.substring(0, err.length() - newLine.length()); |
| 201 |
} |
202 |
} |
| 202 |
|
203 |
|
|
|
204 |
String theOS = System.getProperty("os.name"); //$NON-NLS-1$ |
| 205 |
boolean isZ = theOS.toLowerCase().startsWith("z"); //$NON-NLS-1$ |
| 206 |
// special case for bug 290290 - which only occurs on z/OS |
| 207 |
if (isZ && err.startsWith("cp: FSUM8985")){ //$NON-NLS-1$ |
| 208 |
// attempt against without the -p |
| 209 |
if (folderCopy) { |
| 210 |
command = "cp -R " + source + " " + tgt; //$NON-NLS-1$ //$NON-NLS-2$ |
| 211 |
} |
| 212 |
else { |
| 213 |
command = "cp " + source + " " + tgt; //$NON-NLS-1$ //$NON-NLS-2$ |
| 214 |
} |
| 215 |
String theShell = "sh"; //$NON-NLS-1$ |
| 216 |
String args[] = new String[3]; |
| 217 |
args[0] = theShell; |
| 218 |
args[1] = "-c"; //$NON-NLS-1$ |
| 219 |
args[2] = command; |
| 220 |
|
| 221 |
p = runtime.exec(args); |
| 222 |
|
| 223 |
// wait for process to finish |
| 224 |
p.waitFor(); |
| 225 |
|
| 226 |
// get the exit value of the process |
| 227 |
result = p.exitValue(); |
| 228 |
|
| 229 |
// if the exit value is not 0, then the process did not terminate normally |
| 230 |
if (result == 0) { |
| 231 |
status.setAttribute(DE.A_SOURCE, IServiceConstants.SUCCESS); |
| 232 |
return; |
| 233 |
} |
| 234 |
} |
| 235 |
|
| 203 |
// if there is something in error buffer |
236 |
// if there is something in error buffer |
| 204 |
// there was something in the error stream of the process |
237 |
// there was something in the error stream of the process |
| 205 |
if (err.length() > 0) { |
238 |
if (err.length() > 0) { |