Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a8c02d77 authored by Kenny Root's avatar Kenny Root
Browse files

Fix regression in directory scanning

Previous range-checking fix removed an inequality check. This change
restores it.

Offending change was I5eb310ced58c3c64a7af2d11b80326efe5adbcab

Change-Id: Ic952c3ba5a4f7e5ab2148ec623b6f083cb7495fb
parent 650e22ca
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ status_t MediaScanner::processDirectory(

    int pathRemaining = PATH_MAX - pathLength;
    strcpy(pathBuffer, path);
    if (pathLength > 0 && pathBuffer[pathLength - 1]) {
    if (pathLength > 0 && pathBuffer[pathLength - 1] != '/') {
        pathBuffer[pathLength] = '/';
        pathBuffer[pathLength + 1] = 0;
        --pathRemaining;