Code: Select all
FileName$ = OpenFileRequester("Check file MD5 checksum", DefaultFile$, "ISO files (*.iso)|*.iso|All files (*.*)|*.*", 0)
If FileName$
Result$ = MD5FileFingerprint(FileName$)
FileSize.l = FileSize(FileName$)
If FileSize <> -1 And FileSize <> -2 ; Check that file isn't a folder and that it exist.
FileSize_msg.s = "Filesize: " + Str(FileSize) + " bytes."
FileSize_msg.s + " ("
FileSize_msg.s + Str(FileSize/1024) + " KB. "
FileSize_msg.s + Str(FileSize/1024/1024) + " MB. "
FileSize_msg.s + Str(FileSize/1024/1024/1024) + " GB."
FileSize_msg.s + ")"
MessageRequester("Result", "Filename: " + Chr(13) + Chr(10) + FileName$ + Chr(13) + Chr(10) + FileSize_msg.s + Chr(13) + Chr(10) + "MD5 checksum: " + Result$)
EndIf
EndIf
End
Does anyone know why this happens?Gtk-CRITICAL **: file gtkfilesel.c: line 622 (gtk_file_selection_set_filename): assertion `filename != NULL' failed.