Jamie,

Unfortunately it's not easy to have none open, since the browse code
assumes you have selected a particular share.

How about this: by default it opens the last one, rather than the first?
That way all the other shares will appear first.

It's a very simple change if you want to try it.  Here's a diff (just
replace the 0 index with -1):

Craig

--- a/lib/BackupPC/CGI/Browse.pm
+++ b/lib/BackupPC/CGI/Browse.pm
@@ -84,7 +84,7 @@ sub action
     if ( $dir eq "" || $dir eq "." || $dir eq ".." ) {
  $attr = $view->dirAttrib($num, "", "");
  if ( keys(%$attr) > 0 ) {
-     $share = (sort(keys(%$attr)))[0];
+     $share = (sort(keys(%$attr)))[-1];
      $dir   = '/';
  } else {
             ErrorExit(eval("qq{$Lang->{Directory___EscHTML}}"));


On Fri, Nov 24, 2017 at 10:07 AM, Jamie Burchell <ja...@ib3.co.uk> wrote:

> Hey
>
> Is it possible to configure BackupPC 4 not to expand the first directory
> when viewing a backup?
>
> I'm currently backing up 3 directories from Linux webservers:
>
> /etc
> /var/lib/mysqlbackup
> /var/www
>
> Unfortunately, as the first directory contains many files, it's not
> immediately obvious that there are other (arguably more likely to be
> restored) root directories available to chose from. The other two get a bit
> lost and it's necessary to scroll to see them.
>
> Ideally, all directories would be collapsed so it's obvious what is
> available from the backup and the user can drill-down in to it.
>
> I appreciate this might not be for everybody, so perhaps a configuration
> parameter for it would be better?
>
> Thanks
> Jamie
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> BackupPC-users mailing list
> BackupPC-users@lists.sourceforge.net
> List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
> Wiki:    http://backuppc.wiki.sourceforge.net
> Project: http://backuppc.sourceforge.net/
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

Reply via email to