[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE_3_1_BRANCH: kdeutils/ksim/monitors/filesystem
From:       Laurent Montel <montell () club-internet ! fr>
Date:       2003-03-14 9:23:08
[Download RAW message or body]

CVS commit by mlaurent: 

Fix crash when partition size = 0 as /dev


  M +6 -3      ksimfsystem.cpp   1.55.2.1


--- kdeutils/ksim/monitors/filesystem/ksimfsystem.cpp  #1.55:1.55.2.1
@@ -237,5 +237,8 @@ void Fsystem::createFreeInfo()
     // (the current mounted partition)
     getMountInfo((*it).first, total, free);
-    int percent = ((total - free) * 100) / total;
+    int percent = 0;
+        if( total != 0)
+                percent = ((total - free) * 100) / total;
+    
     m_scroller->append(i, total, (*it).first);
     m_scroller->setValue(i, total - free);


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic