Skip to content

Commit

Permalink
Remove StorageException
Browse files Browse the repository at this point in the history
  • Loading branch information
binwiederhier committed Apr 20, 2014
1 parent 10ae8b7 commit 40e119d
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ public boolean testTargetCanWrite() {
}

@Override
public boolean testTargetExists() throws StorageException {
public boolean testTargetExists() {
try {
SftpATTRS attrs = channel.stat(repoPath);
boolean targetExists = attrs.isDir();
Expand All @@ -371,14 +371,12 @@ public boolean testTargetExists() throws StorageException {
}

@Override
public boolean testTargetCanCreate() throws StorageException {
public boolean testTargetCanCreate() {
// Find parent path
String repoPathNoSlash = FileUtil.removeTrailingSlash(repoPath);
int repoPathLastSlash = repoPathNoSlash.lastIndexOf("/");
String parentPath = (repoPathLastSlash > 0) ? repoPathNoSlash.substring(0, repoPathLastSlash) : "/";

System.out.println(parentPath);

// Test parent path permissions
try {
SftpATTRS parentPathStat = channel.stat(parentPath);
Expand Down

0 comments on commit 40e119d

Please sign in to comment.