libopkg: fix md5sum calculation
[project/opkg-lede.git] / libopkg / file_util.c
index 3a1761eea76d331e15d8327bfb20ca8f86e52d92..8e698cc58006703dd84b5b79499683090db8a833 100644 (file)
@@ -153,7 +153,7 @@ char *file_md5sum_alloc(const char *file_name)
 
        len = md5sum(file_name, md5sum_bin);
 
-       if (len) {
+       if (len < 0) {
                opkg_msg(ERROR, "Could't compute md5sum for %s.\n", file_name);
                return NULL;
        }