Bareos Bug Tracker - bareos-core
View Issue Details
0000893bareos-core[All Projects] webuipublic2018-01-23 08:462018-06-22 17:19
tonyalbers 
frank 
highmajoralways
resolvedfixed 
LinuxCentOS7
17.2.4 
 
0000893: webui cannot list dirs with only files in them
We have a user's homedir which contains only files. When trying to browse the backup in the webui, it says: "Oops, something went wrong, probably too many files."
The user has 76 files in his homedir.
Another user's homedir which has files AND folders is browsable.
Not entirely sure, but we use the following fileset resource:

FileSet {
  Name = "p004home"
  Description = "Backup Project 004 user homedirs."
  Include {

     Options {
        exclude = yes
        wilddir = /data/home/*p004/data
        wild = /data/home/*lock_file*
     }
     Options {
        signature = MD5
        wilddir = /data/home/*p004
        wild = /data/home/*p004/*
     }
     Options {
        exclude = yes
        wilddir = /data/home/*
     }

     File = /data/home/
  }
}
May be related to: 0000891

Also, it seems that in the output it misses a comma sometimes. If I open the webui in Chrome, choose CTRL+SHIFT+I for developer tools and use network monitoring, I can see that in the last communication before the popup there's something wrong with the json output. First statement is not separated from the second by a comma:
[{"id":"-12408","text":".ssh/","icon":"glyphicon glyphicon-folder-close","state":"","data":{"type":"D","fullpath":"\/data\/home\/tegp004\/.ssh\/","pathid":12408,"fileid":1990019,"stat":{"atime":1516607463,"dev":64770,"ino":9840045,"group":"20503","rdev":0,"mtime":1511276383,"mode":16832,"nlink":2,"user":"20503","size":4096,"ctime":1511276394},"name":".ssh\/","jobid":21643,"lstat":"P0C liWt EHA C FAX FAX A BAA BAA I BaZZfn BaFD9f BaFD9q A A C","linkfileindex":0},"children":true}{"id"...

(Last few words, no comma between } and { )
webui
related to 0000891resolved frank Webui will not open some windows clients directories 
child of 0000910closed  Release bareos-17.2.5 
patch 893.patch (1,166) 2018-01-23 15:07
http://bugs.bareos.org/file_download.php?file_id=278&type=bug
Issue History
2018-01-23 08:46tonyalbersNew Issue
2018-01-23 15:07asger_blekingeFile Added: 893.patch
2018-01-23 15:10asger_blekingeNote Added: 0002879
2018-01-23 15:12asger_blekingeNote Added: 0002880
2018-01-23 15:13asger_blekingeTag Attached: webui
2018-01-26 16:29frankAssigned To => frank
2018-01-26 16:29frankStatusnew => assigned
2018-02-13 18:42frankStatusassigned => confirmed
2018-02-13 18:52frankChangeset attached => bareos-webui bareos-17.2 ee232a6f
2018-02-13 18:52frankNote Added: 0002909
2018-02-13 18:52frankStatusconfirmed => resolved
2018-02-13 18:52frankResolutionopen => fixed
2018-02-13 18:55frankRelationship addedchild of 0000910
2018-03-12 11:33frankRelationship addedrelated to 0000891

Notes
(0002879)
asger_blekinge   
2018-01-23 15:10   
Uploaded patch that solves the problem.

The problem is that is that if the directory list does not include . and .., the RemoteController will fail when generating JSON output.

It expects the list to contain . and .., which it filters out. But it only puts a , after the directory list if the list contains more than 2 directories. However, if the list does NOT contain . and .., this means the produced JSON will be invalid if the list contains less than 3 normal directories.
(0002880)
asger_blekinge   
2018-01-23 15:12   
So the bug title is actually wrong. It should be something like "webui cannot list directories with at least 1 file and between 1 and 3 direct subdirectories"

And the error message should probably not be "Oops, something went wrong, probably too many files.", but rather "Oops, something went wrong, probably too few directories." ;)
(0002909)
frank   
2018-02-13 18:52   
Fix committed to bareos-webui bareos-17.2 branch with changesetid 7738.