summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.c11
1 files changed, 11 insertions, 0 deletions
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();