]> sigrok.org Git - libsigrokdecode.git/commitdiff
libsigrokdecode fix to handle unusual dirnames.
authorUwe Hermann <redacted>
Sat, 15 Jan 2011 03:26:07 +0000 (04:26 +0100)
committerUwe Hermann <redacted>
Sat, 15 Jan 2011 11:46:17 +0000 (12:46 +0100)
Windows paths such as c:\... and/or those with spaces in them were
problematic.

decode.c

index 2cae1dbbf0106768b9950fe9716ecafdab60dfe1..da8624a4a40f125784398c64da9ca7a9f1dd45b0 100644 (file)
--- a/decode.c
+++ b/decode.c
@@ -51,7 +51,7 @@ int sigrokdecode_init(void)
        /* FIXME: Check error code. */
        /* FIXME: What happens if this function is called multiple times? */
        PyRun_SimpleString("import sys;"
-                          "sys.path.append('" DECODERS_DIR "');");
+                          "sys.path.append(r'" DECODERS_DIR "');");
 
        if (!(dir = opendir(DECODERS_DIR)))
                return SIGROKDECODE_ERR_DECODERS_DIR;