Update the copyright notice

This commit is contained in:
Pierre Pronchery 2018-04-21 22:28:18 +02:00
parent 05ef48e935
commit 10cf90c1e0
2 changed files with 8 additions and 4 deletions

View File

@ -1,5 +1,5 @@
/* $Id$ */ /* $Id$ */
/* Copyright (c) 2011-2017 Pierre Pronchery <khorben@defora.org> */ /* Copyright (c) 2011-2018 Pierre Pronchery <khorben@defora.org> */
/* This file is part of DeforaOS libDesktop */ /* This file is part of DeforaOS libDesktop */
/* All rights reserved. /* All rights reserved.
* *
@ -275,17 +275,21 @@ static MimeHandler * _get_handler_executable(char const * type,
char const * program) char const * program)
{ {
MimeHandler * handler; MimeHandler * handler;
String * p;
if((handler = mimehandler_new()) == NULL) if((handler = mimehandler_new()) == NULL)
return NULL; return NULL;
if(mimehandler_set(handler, "Type", "Application") != 0 if((p = string_new_append(program, " %f", NULL)) == NULL
|| mimehandler_set(handler, "Type", "Application") != 0
|| mimehandler_set(handler, "Name", program) != 0 || mimehandler_set(handler, "Name", program) != 0
|| mimehandler_set(handler, "MimeType", type) != 0 || mimehandler_set(handler, "MimeType", type) != 0
|| mimehandler_set(handler, "Exec", program) != 0) || mimehandler_set(handler, "Exec", p) != 0)
{ {
string_delete(p);
mimehandler_delete(handler); mimehandler_delete(handler);
return NULL; return NULL;
} }
string_delete(p);
return handler; return handler;
} }

View File

@ -1,5 +1,5 @@
/* $Id$ */ /* $Id$ */
/* Copyright (c) 2017-2018 Pierre Pronchery <khorben@defora.org> */ /* Copyright (c) 2018 Pierre Pronchery <khorben@defora.org> */
/* This file is part of DeforaOS Desktop libDesktop */ /* This file is part of DeforaOS Desktop libDesktop */
/* All rights reserved. /* All rights reserved.
* *