File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -145,6 +145,16 @@ function parse_char_json(_emotions, _json_file) {
145145 }
146146}
147147
148+ function directory_nonempty (_path) {
149+ if (!directory_exists (_path)) {
150+ return false ;
151+ }
152+ var _file = file_find_first (_path + " /*" , fa_none);
153+ var _output = (_file != " " );
154+ file_find_close ();
155+ return _output;
156+ }
157+
148158function create_target_button_directories (_emotions, _current_directory) {
149159 var _target_button_directories_created = ds_map_create ();
150160 for (var _i = 1 ; _i <= ds_map_size (_emotions); _i++) {
@@ -153,7 +163,7 @@ function create_target_button_directories(_emotions, _current_directory) {
153163 if (ds_map_exists (_target_button_directories_created, _candidate_target_button_directory)) {
154164 continue ;
155165 }
156- if (directory_exists (_candidate_target_button_directory)) {
166+ if (directory_nonempty (_candidate_target_button_directory)) {
157167 _candidate_target_button_directory += " 2" ;
158168 _emote.target_button_directory += " 2" ;
159169 }
You can’t perform that action at this time.
0 commit comments