Hello,
I'm using geany 1.24.1 on Slackware64 14.1.
In project.c, when using path relative to the project filename, the base_path and the project filename's path are concatenated, but without any directory separator between them, which leads geany to create wrong folder.
For instance :
$ mkdir /tmp/projects
$ mkdir /tmp/projects/foo
1) without project file inside project base directory:
Edit > Preference > General >
Startup > Project files : /tmp/projects
Miscellaneous > Project > Store project file inside the project base directory = Off
Project > New
Name : foo
filename: /tmp/projects/foo.geany
base path: foo
Click button "create". Geany mistakenly asks to create the project's base path, because, at this point, the variable locale_path (line #686 in project.c) is set to "/tmp/projectsfoo" (instead of "projects/foo")
2) with project file inside project base directory :
$ mkdir /tmp/projects/bar
Edit > Preference > General >
Miscellaneous > Project > Store project file inside the project base directory = On
Project > New
Name : bar
filename: /tmp/projects/bar/bar.geany
base path: ./
Click button "create". Geany mistakenly asks to create the project's base path, because, at this point, the variable locale_path (line #686 in project.c) is set to "/tmp/projects/bar./" (instead of "projects/bar/./")
the attached patch solves this issue.
Hope this helps.
--
SeB
Setup like above, When I type foo in name the base path is /tmp/projects/foo not just foo??
Hello,
From base path's help :
"base directory of all files that makes up the project. this can be a new path, or an existing directory tree. You can use paths relative to the project filename."
By default, the project's base path is absolute:
You need to change it manually if you want the project's base path to be relative to the project's filename:
Once you did that, geany is about to create the directory "foo" :
However, if you change the line #696 in src/project.c from:
_("The path \"%s\" does not exist."),
To
_("The path \"%s\" does not exist (locale_path=\"%s\")"),
This shows you that geany is about to create the directory /tmp/projectsfoo :
That's because the function g_strconcat is used at line #686 in src/project.c:
SETPTR(locale_path, g_strconcat(dir, locale_path, NULL));
--
SeB
Last edit: Sébastien Ballet 2014-08-12
oh, ok, you manually changed it to foo, I thought something else was wrong and giving the wrong field contents.
Ok, yes the path is incorrectly generated, thanks for reporting.
Fixed in [8b0990e52a1c2bfaf8678d4e14fb18a256618ddb], thanks for reporting
Related
Commit: [8b0990]