[Geany-devel] Making directory?

Enrico Tröger enrico.troeger at xxxxx
Sun Sep 9 11:57:56 UTC 2012


On 09/09/12 13:11, Lex Trotman wrote:
> Reference https://sourceforge.net/tracker/?func=detail&aid=3440252&group_id=153444&atid=787791
> last example the call to utils_mkdir() inside
> utils_get_config_files().
> 
> Can anyone explain why a function that is meant to be listing config
> files is creating an empty directory?

Probably just to be safe.

I agree that it looks wrong to create a directory in a function used to
list contents of a directory.

However, IIRC, the basic idea of the mkdir() itself was to create
sub-directories in the user's config directory for his convenience. So
the user sees after the first start of Geany which directories are read
and so he sees where to place custom configs.

The mkdir() call could be moved out of utils_get_config_files() into
src/main.c:create_config_dir() where also other sub-directories in the
user's config directory are created.
Then those were all in one place which is probably good.

Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
URL: <http://lists.geany.org/pipermail/devel/attachments/20120909/37b44c8a/attachment.pgp>


More information about the Devel mailing list