Jelajahi Sumber

libobs: Don't search '.' and '..' dirs for modules

On windows doing os_glob will also include '.' and '..', exclude these
when searching for modules.
jp9000 10 tahun lalu
induk
melakukan
7e3efa86e5
1 mengubah file dengan 3 tambahan dan 0 penghapusan
  1. 3 0
      libobs/obs-module.c

+ 3 - 0
libobs/obs-module.c

@@ -253,6 +253,9 @@ static void process_found_module(struct obs_module_path *omp,
 	char                   *parsed_data_dir;
 	bool                   bin_found = true;
 
+	if (strcmp(path, ".") == 0 || strcmp(path, "..") == 0)
+		return;
+
 	file = strrchr(path, '/');
 	file = file ? (file + 1) : path;