Eolian: fix issue for Windows.
authorDaniel Zaoui <daniel.zaoui@samsung.com>
Wed, 28 May 2014 06:32:56 +0000 (09:32 +0300)
committerDaniel Zaoui <daniel.zaoui@samsung.com>
Wed, 28 May 2014 06:36:30 +0000 (09:36 +0300)
On Windows, '\' are used to separate the names of a path. It was not
supported.
This patch fixes that. Thanks to Vincent Torri for catching it (and good
luck in Windows ;-))

src/lib/eolian/eolian_database.c

index 4390c9a..6f16d67 100644 (file)
@@ -1371,7 +1371,7 @@ eolian_directory_scan(const char *dir)
           {
              int len = strlen(file);
              int idx = len - 1;
-             while (idx >= 0 && file[idx] != '/') idx--;
+             while (idx >= 0 && file[idx] != '/' && file[idx] != '\\') idx--;
              eina_hash_add(_filenames, eina_stringshare_add_length(file+idx+1, len - idx - sizeof(EO_SUFFIX)), strdup(file));
           }
      }