nikawhite pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9266ce4bd5d1e824e4489cf0e34fbfa7e2e865bc

commit 9266ce4bd5d1e824e4489cf0e34fbfa7e2e865bc
Author: Mykyta Biliavskyi <[email protected]>
Date:   Fri Oct 21 15:46:49 2016 +0300

    Elm_theme: parse theme name "<disk>:/file.ext" only on Windows.
    
    Commit 86928a430c broke ability to use more than one theme file for
    posix compatible systems. For case
    ELM_THEME=/home/user/a.edj:/home/user/b.edj string was parsed
    incorrectly. The result was a single string
    "/home/user/a.edj:/home/user/b.edj", but expected two strings
    "/home/user/a.edj" and "/home/user/b.edj"
    
    This commit add additional check of the file paths like
    <disk>:/filename.ext or <disk>:\filename.ext in Windows only.
    This avoid wrong parse behaviour on Linux and macOS.
---
 src/lib/elementary/elm_theme.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/elm_theme.c b/src/lib/elementary/elm_theme.c
index de5aea3..e292cbc 100644
--- a/src/lib/elementary/elm_theme.c
+++ b/src/lib/elementary/elm_theme.c
@@ -399,14 +399,17 @@ _elm_theme_parse(Elm_Theme *th, const char *theme)
                   eina_strbuf_append_char(buf, ':');
                   pe += 2;
                }
-             else if ((isalpha(pe[0]) && (pe[1] == ':') && pe[2] == '/'))
+#ifdef HAVE_ELEMENTARY_WIN32
+             else if (isalpha(pe[0]) && (pe[1] == ':') &&
+                      ((pe[2] == '/') || (pe[2] == '\\')))
                {
-                  // Correct processing file path on  Windows OS "<disk>:/"
+                  // Correct processing file path on  Windows OS "<disk>:/" or 
"<disk>:\"
                   eina_strbuf_append_char(buf, *pe);
                   pe++;
                   eina_strbuf_append_char(buf, *pe);
                   pe++;
                }
+#endif
              else if ((*pe == ':') || (!*pe))
                { // p -> pe == 'name:'
                   if (pe > p)

-- 


Reply via email to