File tree Expand file tree Collapse file tree
java/org/apache/catalina/ha/deploy Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -168,9 +168,6 @@ public void start() throws Exception {
168168 return ;
169169 }
170170 if (watchEnabled ) {
171- if (getDeployDirFile ().getCanonicalPath ().equals (getWatchDirFile ().getCanonicalPath ())) {
172- throw new IllegalStateException (sm .getString ("farmWarDeployer.samePathDeployWatch" ));
173- }
174171 watcher = new WarWatcher (this , getWatchDirFile ());
175172 if (log .isInfoEnabled ()) {
176173 log .info (sm .getString ("farmWarDeployer.watchDir" , getWatchDir ()));
@@ -654,6 +651,7 @@ public File getTempDirFile() {
654651 */
655652 public void setTempDir (String tempDir ) {
656653 this .tempDir = tempDir ;
654+ tempDirFile = null ;
657655 }
658656
659657 /**
@@ -767,6 +765,10 @@ public void setMaxValidTime(int maxValidTime) {
767765 */
768766 protected boolean copy (File from , File to ) {
769767 try {
768+ if (from .getCanonicalPath ().equals (to .getCanonicalPath ())) {
769+ throw new IOException (sm .getString ("farmWarDeployer.samePathCopy" ));
770+ }
771+
770772 if (!to .exists ()) {
771773 if (!to .createNewFile ()) {
772774 log .error (sm .getString ("fileNewFail" , to ));
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ farmWarDeployer.removeLocalFail=Unable to remove WAR file
3434farmWarDeployer.removeStart =Cluster wide remove of web app [{0}]
3535farmWarDeployer.removeTxMsg =Send cluster wide undeployment from [{0}]
3636farmWarDeployer.renameFail =Failed to rename [{0}] to [{1}]
37- farmWarDeployer.samePathDeployWatch = deployDir and watchDir must be different directories
37+ farmWarDeployer.samePathCopy = Source and destination must be different directories
3838farmWarDeployer.sendEnd =Send cluster war deployment path [{0}], war [{1}] finished.
3939farmWarDeployer.sendFragment =Send cluster war fragment path [{0}], war [{1}] to [{2}]
4040farmWarDeployer.sendStart =Send cluster war deployment path [{0}], war [{1}] started.
You can’t perform that action at this time.
0 commit comments