Skip to content

Commit

Permalink
Fix crash on getting filesystem usage
Browse files Browse the repository at this point in the history
I'm not sure why this didn't crash before the recent FilySystemInfo changes,
but for sure it does with.  We were reading the wrong number of iterators,
causing the toInt() to be called on non-ints, causing fun.  Also, on the last
loop, we'd be reading from iterators not in the list as we were out of whack.
  • Loading branch information
Beirdo committed Jun 6, 2011
1 parent 02881f3 commit 2ca486e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mythtv/programs/mythbackend/mainserver.cpp
Expand Up @@ -4300,6 +4300,7 @@ void MainServer::BackendQueryDiskSpace(QStringList &strlist, bool consolidated,
fsInfo.setPath(*(it++));
fsInfo.setLocal((*(it++)).toInt() > 0);
fsInfo.setFSysID(-1);
it++; // Without this, the strlist gets out of whack
fsInfo.setGroupID((*(it++)).toInt());
fsInfo.setBlockSize((*(it++)).toInt());
fsInfo.setTotalSpace((*(it++)).toLongLong());
Expand Down

0 comments on commit 2ca486e

Please sign in to comment.