summaryrefslogtreecommitdiff
path: root/apps/plugins/wav2wv.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/wav2wv.c')
-rw-r--r--apps/plugins/wav2wv.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/plugins/wav2wv.c b/apps/plugins/wav2wv.c
index e2db398ef7..cd27c92699 100644
--- a/apps/plugins/wav2wv.c
+++ b/apps/plugins/wav2wv.c
@@ -123,6 +123,7 @@ static int wav2wv(const char *infile)
123 123
124 if (rb->read (in_fd, &raw_header, sizeof (raw_header)) != sizeof (raw_header)) { 124 if (rb->read (in_fd, &raw_header, sizeof (raw_header)) != sizeof (raw_header)) {
125 rb->splash(HZ*2, "could not read file!"); 125 rb->splash(HZ*2, "could not read file!");
126 rb->close (in_fd);
126 return true; 127 return true;
127 } 128 }
128 129
@@ -135,6 +136,7 @@ static int wav2wv(const char *infile)
135 rb->strncmp (native_header.data_ckID, "data", 4) || 136 rb->strncmp (native_header.data_ckID, "data", 4) ||
136 native_header.FormatTag != 1 || native_header.BitsPerSample != 16) { 137 native_header.FormatTag != 1 || native_header.BitsPerSample != 16) {
137 rb->splash(HZ*2, "incompatible wav file!"); 138 rb->splash(HZ*2, "incompatible wav file!");
139 rb->close (in_fd);
138 return true; 140 return true;
139 } 141 }
140 142
@@ -266,6 +268,7 @@ static int wav2wv(const char *infile)
266 else 268 else
267 rb->splash(HZ*3, "operation successful"); 269 rb->splash(HZ*3, "operation successful");
268 270
271 rb->reload_directory();
269 return error; 272 return error;
270} 273}
271 274
@@ -290,6 +293,5 @@ enum plugin_status plugin_start(const void *parameter)
290#ifdef HAVE_ADJUSTABLE_CPU_FREQ 293#ifdef HAVE_ADJUSTABLE_CPU_FREQ
291 rb->cpu_boost(false); 294 rb->cpu_boost(false);
292#endif 295#endif
293 /* Return PLUGIN_USB_CONNECTED to force a file-tree refresh */ 296 return PLUGIN_OK;
294 return PLUGIN_USB_CONNECTED;
295} 297}