View Single Post
Old 12-24-2014, 12:22 PM   #275
rkomar
Wizard
rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.rkomar ought to be getting tired of karma fortunes by now.
 
Posts: 3,045
Karma: 18821071
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
To see the type of the archive file, the program first looks at the "magic number" at the start of the file to see if it can identify it. If that fails, then it looks at the suffix of the file name. If your RAR files are not recognized by their magic number and have to have the suffix changed, then maybe they have a different magic number at the beginning than is being looked for. In my code, I am looking to see if the first four bytes in the file are "Rar!" (i.e. 0x52 0x61 0x72 0x21) to identify it as a RAR file. Can you see if the files that need to have their suffix changed to .cbr have a different magic number at the beginning?
rkomar is offline   Reply With Quote