Skip to content

Commit

Permalink
Merge pull request #356 from lmagyar/pf-fix-virtual-folder-names-again
Browse files Browse the repository at this point in the history
Fix virtual folder names - again
  • Loading branch information
wolpi authored Jun 8, 2024
2 parents 04dd943 + 502b486 commit 665db04
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions primitiveFTPd/src/org/primftpd/filesystem/VirtualFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public VirtualFile(
PftpdService pftpdService) {
super(
absPath,
delegate != null ? delegate.getName() : absPath,
delegate != null ? delegate.getName() : absPath.length() > 1 && absPath.charAt(0) == '/' ? absPath.substring(1) : absPath,
delegate != null ? delegate.getLastModified() : 0,
delegate != null ? delegate.getSize() : 0,
delegate == null || delegate.isReadable(),
Expand Down Expand Up @@ -82,10 +82,10 @@ public boolean delete() {
public List<T> listFiles() {
if ("/".equals(absPath)) {
List<T> files = new ArrayList<>(4);
files.add(createFile(VirtualFileSystemView.PREFIX_FS, null, pftpdService));
files.add(createFile(VirtualFileSystemView.PREFIX_ROOT, null, pftpdService));
files.add(createFile(VirtualFileSystemView.PREFIX_SAF, null, pftpdService));
files.add(createFile(VirtualFileSystemView.PREFIX_ROSAF, null, pftpdService));
files.add(createFile("/" + VirtualFileSystemView.PREFIX_FS, null, pftpdService));
files.add(createFile("/" + VirtualFileSystemView.PREFIX_ROOT, null, pftpdService));
files.add(createFile("/" + VirtualFileSystemView.PREFIX_SAF, null, pftpdService));
files.add(createFile("/" + VirtualFileSystemView.PREFIX_ROSAF, null, pftpdService));
return Collections.unmodifiableList(files);
}
return listDelegateFiles();
Expand Down

0 comments on commit 665db04

Please sign in to comment.