~elementary-apps/pantheon-files/trunk

« back to all changes in this revision

Viewing changes to libcore/gof-file.c

  • Committer: Fabio Zaramella
  • Date: 2015-03-01 16:48:21 UTC
  • mfrom: (1765 f)
  • mto: This revision was merged to the branch mainline in revision 1892.
  • Revision ID: ffabio.96.x@gmail.com-20150301164821-isk9h5x95oa00vuk
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1429
1429
    if (g_file_info_get_attribute_boolean (file->info, G_FILE_ATTRIBUTE_ACCESS_CAN_EXECUTE))
1430
1430
    {
1431
1431
        /* get the content type of the file */
1432
 
        //TODO
1433
 
        //content_type = g_file_info_get_content_type (file->info);
1434
1432
        content_type = gof_file_get_ftype (file);
1435
1433
        if (G_LIKELY (content_type != NULL))
1436
1434
        {
1442
1440
             * g_content_type_can_be_executable() for unix because it also returns
1443
1441
             * true for "text/plain" and we don't want that */
1444
1442
            if (g_content_type_is_a (content_type, "application/x-executable")
1445
 
                || g_content_type_is_a (content_type, "application/x-shellscript")
1446
 
                || g_content_type_is_a (content_type, "application/octet-stream"))
1447
 
            {
 
1443
                || g_content_type_is_a (content_type, "application/x-shellscript"))
1448
1444
                can_execute = TRUE;
1449
 
            }
1450
1445
#endif
1451
1446
        }
1452
1447
    }
1503
1498
 
1504
1499
void
1505
1500
gof_file_set_expanded (GOFFile *file, gboolean expanded) {
1506
 
    g_return_if_fail (file != NULL || !file->is_directory);
 
1501
    g_return_if_fail (file != NULL && file->is_directory);
1507
1502
    file->is_expanded = expanded;
1508
1503
}
1509
1504