[rygel] media-export: Do a proper check for hidden files.



commit fbbd88f11c89d08280b0f8e46be9d051bf05b8f1
Author: Krzesimir Nowak <krnowak openismus com>
Date:   Wed Jan 30 12:14:04 2013 +0100

    media-export: Do a proper check for hidden files.

 .../rygel-media-export-harvesting-task.vala        |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/media-export/rygel-media-export-harvesting-task.vala b/src/plugins/media-export/rygel-media-export-harvesting-task.vala
index 982788b..0044d05 100644
--- a/src/plugins/media-export/rygel-media-export-harvesting-task.vala
+++ b/src/plugins/media-export/rygel-media-export-harvesting-task.vala
@@ -53,7 +53,8 @@ public class Rygel.MediaExport.HarvestingTask : Rygel.StateMachine,
                                         FileAttribute.STANDARD_TYPE + "," +
                                         FileAttribute.TIME_MODIFIED + "," +
                                         FileAttribute.STANDARD_CONTENT_TYPE + "," +
-                                        FileAttribute.STANDARD_SIZE;
+                                        FileAttribute.STANDARD_SIZE + "," +
+                                        FileAttribute.STANDARD_IS_HIDDEN;
 
     public HarvestingTask (MetadataExtractor    extractor,
                            RecursiveFileMonitor monitor,
@@ -181,7 +182,7 @@ public class Rygel.MediaExport.HarvestingTask : Rygel.StateMachine,
     private bool process_file (File           file,
                                FileInfo       info,
                                MediaContainer parent) {
-        if (info.get_name ()[0] == '.') {
+        if (info.get_is_hidden ()) {
             return false;
         }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]