If we want to check whether a file is a directory, use GLib's g_file_test() instead of stat().
Attach a file by drag & drop or click to upload