diff options
Diffstat (limited to 'Utility/DataUnits.hs')
-rw-r--r-- | Utility/DataUnits.hs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Utility/DataUnits.hs b/Utility/DataUnits.hs index f2bc333ea..0baa5dd89 100644 --- a/Utility/DataUnits.hs +++ b/Utility/DataUnits.hs @@ -137,8 +137,7 @@ compareSizes units abbrev old new {- Parses strings like "10 kilobytes" or "0.5tb". -} readSize :: [Unit] -> String -> Maybe ByteSize readSize units input - | null parsednum = Nothing - | null parsedunit = Nothing + | null parsednum || null parsedunit = Nothing | otherwise = Just $ round $ number * fromIntegral multiplier where (number, rest) = head parsednum |