kwo pushed a commit to branch master.

http://git.enlightenment.org/e16/e16.git/commit/?id=58a64b8199e302f453ffe5ba3d5c212850cd8fcc

commit 58a64b8199e302f453ffe5ba3d5c212850cd8fcc
Author: Kim Woelders <k...@woelders.dk>
Date:   Sat Dec 30 20:10:33 2017 +0100

    theme.c: Fix warning and simplify
---
 src/theme.c | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/src/theme.c b/src/theme.c
index 5e178775..813b65db 100644
--- a/src/theme.c
+++ b/src/theme.c
@@ -199,7 +199,6 @@ ThemesList(int *number)
 static char        *
 _ThemeExtract(const char *path)
 {
-   char                s[FILEPATH_LEN_MAX];
    char                th[FILEPATH_LEN_MAX];
    FILE               *f;
    unsigned char       buf[262];
@@ -239,24 +238,19 @@ _ThemeExtract(const char *path)
    if ((buf[0] == 31) && (buf[1] == 139))
      {
        /* gzipped tarball */
-       Esnprintf(s, sizeof(s),
-                 "gzip -d -c < %s | (cd %s ; tar -xf -)", path, th);
+       E_md(th);
+       Esystem("gzip -d -c < %s | (cd %s ; tar -xf -)", path, th);
      }
    else if ((buf[257] == 'u') && (buf[258] == 's') &&
            (buf[259] == 't') && (buf[260] == 'a') && (buf[261] == 'r'))
      {
        /* vanilla tarball */
-       Esnprintf(s, sizeof(s), "cat %s | (cd %s ; tar -xf -)", path, th);
+       E_md(th);
+       Esystem("cat %s | (cd %s ; tar -xf -)", path, th);
      }
    else
       return NULL;
 
-   E_md(th);
-   path = th;
-
-   /* exec the untar if tarred */
-   Esystem(s);
-
    return _ThemeCheckPath(th);
 }
 

-- 


Reply via email to