]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
filebundle: always open files as binary
authorJoakim Plate <elupus@ecce.se>
Sat, 29 Dec 2012 19:32:59 +0000 (20:32 +0100)
committerJoakim Plate <elupus@ecce.se>
Sat, 29 Dec 2012 19:32:59 +0000 (20:32 +0100)
If files have wrong file endings the stated lenghts
won't match total data read from file.

src/filebundle.c

index 77e335e75314f2e292fdd7f923f8d4e0e5cd0be8..81993d037ae4f0ed9de94d06af5bf6de4717a753 100644 (file)
@@ -384,7 +384,7 @@ fb_file *fb_open2
   } else {
     char path[512];
     snprintf(path, sizeof(path), "%s/%s", dir->d.root, name);
-    FILE *fp = fopen(path, "r");
+    FILE *fp = fopen(path, "rb");
     if (fp) {
       struct stat st;
       lstat(path, &st);