Skip to content

Commit 9084609

Browse files
committed
fs: get_data_path: fix inverted cond + rename
fixed inverted condition rename to get_ug_data_path
1 parent 3a17845 commit 9084609

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

src/audio/capture/fluidsynth.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,8 @@ get_soundfont()
184184
return strdup(env_fs);
185185
}
186186
char bundled[MAX_PATH_SIZE];
187-
snprintf_ch(bundled, "%s/%s", get_data_path(), "TimGM6mb_but_fixed__piano_.sf3");
187+
snprintf_ch(bundled, "%s/%s", get_ug_data_path(),
188+
"TimGM6mb_but_fixed__piano_.sf3");
188189
const char *sf_candidates[] = {
189190
"/usr/share/soundfonts/default.sf2",
190191
"/usr/share/soundfonts/default.sf3",

src/utils/fs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ file_exists(const char *path, enum check_file_type type)
217217
* @retval the path; NULL if not found
218218
*/
219219
const char *
220-
get_data_path()
220+
get_ug_data_path()
221221
{
222222
static __thread char path[MAX_PATH_SIZE];
223223
if (strlen(path) > 0) { // already set
@@ -239,7 +239,7 @@ get_data_path()
239239
}
240240

241241
snprintf_ch(path, SRCDIR "%s", suffix);
242-
if (!file_exists(path, FT_DIRECTORY)) {
242+
if (file_exists(path, FT_DIRECTORY)) {
243243
MSG(VERBOSE, "Using data path %s\n", path);
244244
return path;
245245
}

src/utils/fs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ enum check_file_type {
6868
bool file_exists(const char *path, enum check_file_type type);
6969
const char *get_temp_dir(void);
7070
FILE *get_temp_file(const char **filename);
71-
const char *get_data_path(void);
71+
const char *get_ug_data_path(void);
7272
char *strdup_path_with_expansion(const char *orig_path);
7373

7474
#ifdef __cplusplus

src/video_display/vulkan/vulkan_display.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ get_shader_path()
660660
constexpr char suffix[] = "/vulkan_shaders";
661661
// note that get_install_root returns bin/.. if run from build,
662662
// which will not contain the shaders for out-of-tree builds
663-
const char *data_path = get_data_path();
663+
const char *data_path = get_ug_data_path();
664664
if (data_path != nullptr) {
665665
std::string path_to_shaders = std::string(data_path) + suffix;
666666
std::filesystem::directory_entry dir{ std::filesystem::path(

0 commit comments

Comments
 (0)