diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-12-31 17:27:27 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-12-31 17:27:27 (GMT) |
commit | 2a58fa2124d4bb99c9c134c396c079450b4a8454 (patch) | |
tree | 036382a3c36bede991f4df72e787775d9be903e7 /src | |
parent | a1d2b44c4316be1567b209f0b3d584207c215477 (diff) |
Resolved project path before loading.
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -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(); |