HBASE-22070 Checking restoreDir in RestoreSnapshotHelper
Signed-off-by: Peter Somogyi <psomogyi@apache.org>
This commit is contained in:
parent
3702e7f3de
commit
3aa64b12da
|
@ -729,7 +729,7 @@ public class RestoreSnapshotHelper {
|
|||
throw new IllegalArgumentException("Filesystems for restore directory and HBase root directory " +
|
||||
"should be the same");
|
||||
}
|
||||
if (restoreDir.toUri().getPath().startsWith(rootDir.toUri().getPath())) {
|
||||
if (restoreDir.toUri().getPath().startsWith(rootDir.toUri().getPath() +"/")) {
|
||||
throw new IllegalArgumentException("Restore directory cannot be a sub directory of HBase " +
|
||||
"root directory. RootDir: " + rootDir + ", restoreDir: " + restoreDir);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue