私は完全に困惑しています。Linux でのMTPユニットのマウントを容易にするためのこの小さな機能がありますが、何らかの理由で、変数を使用しているときにlibnotifyにアイコンを表示させることができません。完全なパスをハードコーディングすると問題なく動作しますが、変数をgetcwd
andとして使用すると表示されgetenv
ません。
コードの一部を次に示します。
char cwd[1024];
char *slash = "/";
{
NotifyNotification *mount;
notify_init ("Galaxy Nexus mounter");
if (getcwd(cwd, sizeof(cwd)) != NULL)
{
mount = notify_notification_new ("Samsung Galaxy Nexus", "Mounted at ~/Nexus", ("%s%sandroid_on.png", cwd, slash));
fprintf(stdout, "Icon used %s%sandroid_on.png\n", cwd, slash);
system("jmtpfs ~/Nexus");
notify_notification_set_timeout (mount, 2000);
notify_notification_show (mount, NULL);
}
}
私は何を間違っていますか?