GNOME Bugzilla – Bug 735878
filesrc: use glib APIs for file checking
Last modified: 2014-09-19 15:28:42 UTC
Created attachment 285126 [details] [review] use glib API to check file in gstfilesrc.c, use glib APIs to check whether file is regular/directory. (as FIXME comment says) Patch attached for proposed changes. Please review.
I don't know if this really needs to be fixed. The current code is more efficient and without race condition.
I agree with Tim. But if this is the case the "FIXME we should use glib for this" should be removed. I am assuming the current code is good across all platforms and glib isn't needed for this.
commit 3c4567f5916619f1476e8294391371639f815e10 Author: Tim-Philipp Müller <tim@centricular.com> Date: Thu Sep 18 18:55:47 2014 +0100 filesrc: remove FIXME https://bugzilla.gnome.org/show_bug.cgi?id=735878
(In reply to comment #1) > I don't know if this really needs to be fixed. The current code is more > efficient and without race condition. It's kind of weird that we don't use GLib, while we strictly use that everywhere else. I would have preferred if you added a comment about the race condition and efficiency (with links if needed).
It seemed obvious to me and it's standard operating procedure for all fd/file related things to prefer using the already-open descriptor.
Fix pushed by Tim :)