Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew M. Finkbeiner2016-01-15 14:40:02 -0500
committerAndrew M. Finkbeiner2016-10-06 21:11:53 -0400
commitdb77dbe9ae750ecd698d8285caffa413debb9a94 (patch)
tree109af4b105ba6ff57c0fae286f42b23f03a01812
parent79708ca449c5ce9eb9d2148b9ea0d261ab0205ce (diff)
downloadorg.eclipse.osee-db77dbe9ae750ecd698d8285caffa413debb9a94.tar.gz
org.eclipse.osee-db77dbe9ae750ecd698d8285caffa413debb9a94.tar.xz
org.eclipse.osee-db77dbe9ae750ecd698d8285caffa413debb9a94.zip
bug[ats_ATS266610]: Fix old outfiles issue
-rw-r--r--plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/jobs/StoreOutfileJob.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/jobs/StoreOutfileJob.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/jobs/StoreOutfileJob.java
index 1cde7d5678c..6041ecdb28b 100644
--- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/jobs/StoreOutfileJob.java
+++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/jobs/StoreOutfileJob.java
@@ -144,15 +144,16 @@ public class StoreOutfileJob extends Job {
File oldFile = outputModel.getFile();
if (oldFile != null && oldFile.exists() && oldFile.isFile() && oldFile.canRead()) {
String outputExtension = "." + outputModel.getFileExtension();
+ String extensionRegex = "\\" + outputExtension + "\\b";//escape the . and should be the end of the string (word b
int fileNum = 1;
File destFile =
new File(
- oldFile.getAbsoluteFile().toString().replaceFirst(outputExtension, "." + fileNum + outputExtension));
+ oldFile.getAbsoluteFile().toString().replaceFirst(extensionRegex, "." + fileNum + outputExtension));
if (destFile.exists()) {
while (destFile.exists()) {
fileNum++;
destFile =
- new File(oldFile.getAbsoluteFile().toString().replaceFirst(outputExtension,
+ new File(oldFile.getAbsoluteFile().toString().replaceFirst(extensionRegex,
"." + fileNum + outputExtension));
}
}

Back to the top