Displaying 1 result from an estimated 1 matches for "compression_detect_handler".
2014 Apr 24
1
maildir compressed message fix patch
...eam * fstream;
+ struct istream * cstream;
fname = strrchr(path, '/');
i_assert(fname != NULL);
@@ -650,13 +655,29 @@
info = strchr(fname, MAILDIR_INFO_SEP);
if (info == NULL) info = "";
+ fstream = i_stream_create_file(path, 1024);
+ handler = compression_detect_handler(fstream);
+ if (handler != NULL && handler->create_istream != NULL)
+ {
+ cstream = handler->create_istream(fstream, TRUE);
+ if (i_stream_stat(cstream, TRUE, &stp) < 0)
+ {
+ return -1;
+ }
+ st = *stp; /* dumb copy */
+ i_stream_unref(&cstream);
+...