 diff -Nur -x '*.png' -x '*.gif' -x .gitignore QuoteGeneration/quote_wrapper/quote/qe_logic.cpp QuoteGeneration/quote_wrapper/quote/qe_logic.cpp
 --- QuoteGeneration/quote_wrapper/quote/qe_logic.cpp
 +++ QuoteGeneration/quote_wrapper/quote/qe_logic.cpp
-@@ -162,6 +162,8 @@
+@@ -66,9 +66,11 @@
+     #define SGX_QL_QUOTE_CONFIG_LIB_FILE_NAME "libdcap_quoteprov.so"
+     #define TCHAR char
+     #define _T(x) (x)
++    #define PATH_SEPARATOR '/'
+ #else
+     #define QE3_ENCLAVE_NAME _T("qe3.signed.dll")
+     #define SGX_QL_QUOTE_CONFIG_LIB_FILE_NAME "dcap_quoteprov.dll"
++    #define PATH_SEPARATOR '\\'
+ #endif
+ #define ECDSA_BLOB_LABEL "ecdsa_data.blob"
+ 
+@@ -162,6 +164,8 @@
      se_mutex_t m_ecdsa_blob_mutex;
  
      sgx_ql_request_policy_t m_load_policy;

     sgx_enclave_id_t m_eid;
     sgx_misc_attribute_t m_attributes;
     sgx_launch_token_t m_launch_token;
@@ -170,6 +172,7 @@
 
     ql_global_data():
         m_load_policy(SGX_QL_DEFAULT),

+    sgx_pce_error_t pce_error;
+    int rc = 0;
+    size_t dirpath_len;
+    TCHAR dirpath_copy[MAX_PATH + 1];
+
+#ifndef _MSC_VER
+    dirpath_len = strnlen(dirpath, MAX_PATH);
+#else
+    dirpath_len = _tcsnlen(dirpath, MAX_PATH);
+#endif
+
+    // Ensure that the dirpath ends with a slash
+    memcpy(dirpath_copy, dirpath, dirpath_len);
+    if (dirpath_copy[dirpath_len-1] != PATH_SEPARATOR) {
+      dirpath_copy[dirpath_len] = PATH_SEPARATOR;
+
+      ++dirpath_len;
+      dirpath_copy[dirpath_len] = '\0';
+    }
+
+    if (dirpath_len >= sizeof(g_ql_global_data.m_qe_dirpath))
+    {
