mirror of
https://github.com/swaywm/sway.git
synced 2026-04-25 06:46:24 -04:00
Search for deskop files in correct directories
Signed-off-by: Felix Weilbach <felix.weilbach@t-online.de>
This commit is contained in:
parent
7f2fd4a716
commit
66d3502769
4 changed files with 41 additions and 9 deletions
|
|
@ -9,6 +9,7 @@
|
|||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <wayland-server-protocol.h>
|
||||
#include <sys/stat.h>
|
||||
#include "log.h"
|
||||
#include "util.h"
|
||||
|
||||
|
|
@ -162,3 +163,8 @@ char *append_path_safe(const char *base_path, const char *append_path) {
|
|||
snprintf(path, path_len, "%s/%s", base_path, append_path);
|
||||
return path;
|
||||
}
|
||||
|
||||
bool dir_exists(char *path) {
|
||||
struct stat sb;
|
||||
return stat(path, &sb) == 0 && S_ISDIR(sb.st_mode);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue