Skip to content

Commit

Permalink
Fixes bug on Select Location popup
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanue1 committed May 29, 2015
1 parent 7e50f15 commit 97c9107
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class SelectLocationController {
Container.Entry getParent() { null }
URI getUri() { parentEntry.uri }
String getPath() { parentEntry.path }
boolean isDirectory() { false }
boolean isDirectory() { parentEntry.isDirectory() }
long length() { 0 }
InputStream getInputStream() { null }
Collection<Container.Entry> getChildren() { children }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,18 @@ abstract class AbstractFileLoaderProvider implements FileLoader {
}
// Dummy parent entry
def uri = file.toURI()
def path = uri.path

if (path.endsWith('/'))
path = path.substring(0, path.length()-1)

def parentEntry = new Container.Entry() {
Collection<Container.Entry> children = Collections.emptyList()

Container getContainer() { parentContainer }
Container.Entry getParent() { null }
URI getUri() { uri }
String getPath() { uri.path }
String getPath() { path }
boolean isDirectory() { file.isDirectory() }
long length() { 0 }
InputStream getInputStream() { null }
Expand Down

0 comments on commit 97c9107

Please sign in to comment.