• webGUI Browse / View Files empty


    mgutt
    • Minor

    I have a dir which contains many files and the webGUI stays empty:

     

    16048120_2021-02-0900_25_16.thumb.png.68c0f9334de3591893ad7d55c0abab6a.png

     

    This happens because of /usr/local/emhttp/plugins/dynamix/include/Browse.php which executes the following:

    exec("shopt -s dotglob; stat -L -c'%F|%n|%s|%Y' $all 2>/dev/null",$file);

     

    I executed it manually and it returns an error:

    stat -L -c'%F|%n|%s|%Y' /usr/local/emhttp/mnt/cache/Music/randomfiles/*
    -bash: /usr/bin/stat: Argument list too long

     

    Maybe it should be changed as follows:

    exec("shopt -s dotglob; stat -L -c'%F|%n|%s|%Y' $all 2>/dev/null",$file,$return_var);
    ...
    echo "<thead><tr><th>Type</th><th class='sorter-text'>Name</th><th>Size</th><th>Last Modified</th><th>Location</th></tr></thead>";
    switch ($return_var) {
        case 0:
            break;
        case 1:
            echo "<thead><tr><th></th><th colspan='4'><strong class='red-text'>This directory is empty.</strong></th></tr></thead>";
            break;
        case 126:
            echo "<thead><tr><th></th><th colspan='4'><strong class='red-text'>This directory contains too many files!</strong></th></tr></thead>";
            break;
        default:
           echo "<thead><tr><th></th><th colspan='4'><strong class='red-text'>Unknown error " . intval($return_var) . "</strong></th></tr></thead>";
    }
    

     

     

    Outputs:

    1046842111_2021-02-0900_51_20.png.49d63addfa10e8ec3a738beb918ea992.png

     




    User Feedback

    Recommended Comments



    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.
    Note: Your post will require moderator approval before it will be visible.

    Guest
    Add a comment...

    ×   Pasted as rich text.   Restore formatting

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


  • Status Definitions

     

    Open = Under consideration.

     

    Solved = The issue has been resolved.

     

    Solved version = The issue has been resolved in the indicated release version.

     

    Closed = Feedback or opinion better posted on our forum for discussion. Also for reports we cannot reproduce or need more information. In this case just add a comment and we will review it again.

     

    Retest = Please retest in latest release.


    Priority Definitions

     

    Minor = Something not working correctly.

     

    Urgent = Server crash, data loss, or other showstopper.

     

    Annoyance = Doesn't affect functionality but should be fixed.

     

    Other = Announcement or other non-issue.