Browse Source

[Pal] Enable relative manifest path

borysp 6 years ago
parent
commit
d4ac504842
2 changed files with 2 additions and 2 deletions
  1. 1 0
      Pal/lib/graphene/path.c
  2. 1 2
      Pal/src/db_main.c

+ 1 - 0
Pal/lib/graphene/path.c

@@ -138,6 +138,7 @@ int get_norm_path(const char* path, char* buf, size_t* size_ptr) {
 }
 
 /*
+ * Returns the part after the last '/' (so `path` should probably be normalized).
  * Before calling this function *size should hold the size of buf.
  * After returning it holds number of bytes actually written to it
  * (excluding the trailing '\0').

+ 1 - 2
Pal/src/db_main.c

@@ -272,10 +272,9 @@ noreturn void pal_main (
         unsigned long before_find_manifest = _DkSystemTimeQuery();
 #endif
 
-        /* The rule is to only find the manifest in the current directory */
         /* try open "<execname>.manifest" */
         size_t len = sizeof(uri_buf);
-        ret = get_base_name(exec_uri, uri_buf, &len);
+        ret = get_norm_path(exec_uri, uri_buf, &len);
         if (ret < 0) {
             INIT_FAIL(-ret, "cannot normalize exec_uri");
         }