this should fix http://trac.xbmc.org/ticket/14210
but I just wonder, why the error log produced for multiple times for the same dir, is there multiple video files inside the dir?
Check exists before listing dir, to avoid produce error log, fix #14210
Fix the file system to not log an error on not exist instead.
No, CDirectory::GetDirectory report error is correct behavior. but here we should only call CDirectory::GetDirectory when the dir exists.
I'm surprised we haven't noticed this before, are we sure this is really the issue at play here?
we need wait the reporter to try out, maybe his smb is readonly so the actors never saved there or be deleted?
I've seen this happening (when i cared to look) too once on my system with writeable smb://
The problem probably is that the folders don't even exist and the the log keith showed is from a tv series so there are multiple video files in that folder.
It's much more overhead to do the exist check than just accepting an error
exists is a stat, listing is an open. we are not in python to try...expect which can ignore the error output, and stat has cache there's no much overhead as you thought. besides, we can add cache support to the CDirectory::Exists to use directory cache to speed up.
Do hundreds of them over a slow network. Overhead aplenty.
I don't think the .actors dir exists on 'slow network', it should not
happen. we are talking smb which is in LAN.
besides, we should consider use directory cache for the dir existence check.
Or I should change the pr title to state it only point to a certain
usage place not generic cases.
sorry for the old generic title misleading, this is a specific fix for a specific place which calling GetDirectory on .actors subdir without check Exists first.
I'm seeing this ".actors" error plenty when scraping movies over NFS. So it's not just TV Shows, but movies too, and not just SMB but NFS too. I don't have any .actors directories, yet the scraper is chucking out this "error" message for every movie. Either check it exists before using it, or suppress the "error" message when it doesn't exist and it's not a problem that it doesn't exist.
Did this patch make it in to 12.2? I'm still seeing the .actors error being logged while scanning in a new library with OpenELEC x86 3.0.2 which is supposedly XBMC 12.2, or is this patch only for Gotham?
21:22:26 T:140119973873472 NOTICE: Starting XBMC (12.2 Git:32b1a5e), Platform: Linux (OpenELEC (official) - Version: 3.0.2, 3.7.10 x86_64). Built on May 2 2013
21:24:28 T:140119650768640 ERROR: GetDirectory - Error getting /storage/freenas/media/Video-Private/MoviesHD/.actors
21:24:41 T:140119650768640 ERROR: Previous line repeats 1 times.
21:29:58 T:140119650768640 ERROR: GetDirectory - Error getting /storage/freenas/media/Video-Private/TVShows/The Killing/.actors
21:30:24 T:140119650768640 ERROR: Previous line repeats 40 times.
not in 12.2
sorry for missed this, I was using github issue label to trace commits should be backport, but we closed the 'Issue' tab month ago so I forgot to do that for 12.2.