Lines 13-18
Link Here
|
13 |
* |
13 |
* |
14 |
* Contributors: |
14 |
* Contributors: |
15 |
* {Name} (company) - description of contribution. |
15 |
* {Name} (company) - description of contribution. |
|
|
16 |
* Xuan Chen (IBM) - [194293] [Local][Archives] Saving file second time in an Archive Errors |
16 |
*******************************************************************************/ |
17 |
*******************************************************************************/ |
17 |
|
18 |
|
18 |
package org.eclipse.rse.services.clientserver.archiveutils; |
19 |
package org.eclipse.rse.services.clientserver.archiveutils; |
Lines 1013-1020
Link Here
|
1013 |
if (!file.isDirectory()) { |
1014 |
if (!file.isDirectory()) { |
1014 |
|
1015 |
|
1015 |
// if it exists, call replace |
1016 |
// if it exists, call replace |
1016 |
if (exists(virtualPath + "/" + name)) { //$NON-NLS-1$ |
1017 |
String fullVirtualName = null; |
1017 |
return replace(virtualPath + "/" + name, file, name); //$NON-NLS-1$ |
1018 |
if (virtualPath == null || virtualPath.length() == 0) |
|
|
1019 |
{ |
1020 |
fullVirtualName = name; |
1021 |
} |
1022 |
else |
1023 |
{ |
1024 |
fullVirtualName = virtualPath + "/" + name; //$NON-NLS-1$ |
1025 |
} |
1026 |
if (exists(fullVirtualName)) { |
1027 |
return replace(fullVirtualName, file, name); |
1018 |
} |
1028 |
} |
1019 |
else { |
1029 |
else { |
1020 |
File[] files = new File[1]; |
1030 |
File[] files = new File[1]; |
Lines 1099-1106
Link Here
|
1099 |
// if the entry already exists, then we should do a replace |
1109 |
// if the entry already exists, then we should do a replace |
1100 |
// TODO (KM): should we simply replace and return? |
1110 |
// TODO (KM): should we simply replace and return? |
1101 |
// I think we should check each entry and replace or create for each one |
1111 |
// I think we should check each entry and replace or create for each one |
1102 |
if (exists(virtualPath + "/" + names[i])) { //$NON-NLS-1$ |
1112 |
String fullVirtualName = null; |
1103 |
return replace(virtualPath + "/" + names[i], files[i], names[i]); //$NON-NLS-1$ |
1113 |
if (virtualPath == null || virtualPath.length() == 0) |
|
|
1114 |
{ |
1115 |
fullVirtualName = names[i]; |
1116 |
} |
1117 |
else |
1118 |
{ |
1119 |
fullVirtualName = virtualPath + "/" + names[i]; //$NON-NLS-1$ |
1120 |
} |
1121 |
if (exists(fullVirtualName)) { |
1122 |
return replace(fullVirtualName, files[i], names[i]); |
1104 |
} |
1123 |
} |
1105 |
} |
1124 |
} |
1106 |
|
1125 |
|