File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -225,13 +225,12 @@ varnam_find_symbols_file_directory()
225
225
return strbuf_to_s (varnam_symbols_dir );
226
226
}
227
227
228
+ user_path = strbuf_init (20 );
229
+
228
230
#if defined(WIN32 ) || defined(_WIN32 ) || defined(__WIN32 )
229
231
tmp = getenv ("APPDATA" );
230
232
if (tmp != NULL ) {
231
233
strbuf_addf (user_path , "%s\\varnam\\vst\\" , tmp );
232
- if (!is_directory (strbuf_to_s (user_path ))) {
233
- strbuf_clear (user_path );
234
- }
235
234
}
236
235
#else
237
236
tmp = getenv ("XDG_DATA_HOME" );
@@ -247,15 +246,18 @@ varnam_find_symbols_file_directory()
247
246
#endif
248
247
249
248
if (!strbuf_is_blank (user_path )) {
250
- return strbuf_to_s (user_path );
251
- }
252
- else {
253
- for (i = 0 ; i < ARRAY_SIZE (symbolsFileSearchPath ); i ++ ) {
254
- if (is_directory (symbolsFileSearchPath [i ]))
255
- return symbolsFileSearchPath [i ];
249
+ if (is_path_exists (strbuf_to_s (user_path ))) {
250
+ if (is_directory (strbuf_to_s (user_path ))) {
251
+ return strbuf_to_s (user_path );
252
+ }
256
253
}
257
254
}
258
255
256
+ for (i = 0 ; i < ARRAY_SIZE (symbolsFileSearchPath ); i ++ ) {
257
+ if (is_directory (symbolsFileSearchPath [i ]))
258
+ return symbolsFileSearchPath [i ];
259
+ }
260
+
259
261
return NULL ;
260
262
}
261
263
You can’t perform that action at this time.
0 commit comments