[vlc-devel] commit: Use vlc_openat, fix support for non-UTF-8 systems ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Feb 14 12:33:54 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Feb 14 13:33:35 2010 +0200| [951dd377d0a2c1197be552519c52e4a2f1071e27] | committer: Rémi Denis-Courmont 

Use vlc_openat, fix support for non-UTF-8 systems

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=951dd377d0a2c1197be552519c52e4a2f1071e27
---

 modules/access/directory.c |    3 +--
 modules/access/file.c      |    4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/modules/access/directory.c b/modules/access/directory.c
index a1e1eaa..05155ff 100644
--- a/modules/access/directory.c
+++ b/modules/access/directory.c
@@ -316,8 +316,7 @@ block_t *DirBlock (access_t *p_access)
 
         DIR *handle;
 #ifdef HAVE_FDOPENDIR
-        /* TODO: ToLocale */
-        int fd = openat (dirfd (current->handle), entry, O_RDONLY);
+        int fd = vlc_openat (dirfd (current->handle), entry, O_RDONLY);
         if (fd != -1)
         {
             handle = fdopendir (fd);
diff --git a/modules/access/file.c b/modules/access/file.c
index 6672024..1117dfe 100644
--- a/modules/access/file.c
+++ b/modules/access/file.c
@@ -149,10 +149,10 @@ int Open( vlc_object_t *p_this )
         else if (*end == '/' && end > path)
         {
             char *name = decode_URI_duplicate (end - 1);
-            if (name != NULL) /* TODO: ToLocale(), FD_CLOEXEC */
+            if (name != NULL)
             {
                 name[0] = '.';
-                fd = openat (oldfd, name, O_RDONLY | O_NONBLOCK);
+                fd = vlc_openat (oldfd, name, O_RDONLY | O_NONBLOCK);
                 free (name);
             }
         }




More information about the vlc-devel mailing list