From 2a58fa2124d4bb99c9c134c396c079450b4a8454 Mon Sep 17 00:00:00 2001
From: Cyrille Bagard <nocbos@gmail.com>
Date: Mon, 31 Dec 2018 18:27:27 +0100
Subject: Resolved project path before loading.

---
 src/main.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/main.c b/src/main.c
index 94a34f2..f00a61c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -23,6 +23,7 @@
 
 
 #include <getopt.h>
+#include <limits.h>
 #include <locale.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -172,6 +173,7 @@ int main(int argc, char **argv)
     char *pub;                              /* Chemin de la clef publique  */
 
     bool welcome;                           /* Affichage de la bienvenue ? */
+    char resolved[PATH_MAX];                /* RĂ©solution de nom de fichier*/
     GStudyProject *project;                 /* Nouveau projet courant      */
 
     static struct option long_options[] = {
@@ -325,6 +327,15 @@ int main(int argc, char **argv)
 
     else
     {
+        if (prj_filename != NULL)
+        {
+            prj_filename = realpath(prj_filename, resolved);
+
+            if (prj_filename == NULL)
+                LOG_ERROR_N("realpath");
+
+        }
+
         if (prj_filename == NULL)
             project = g_study_project_new();
 
-- 
cgit v0.11.2-87-g4458