History

prevent duplicate error message

robs committed 17 years ago

Commit faca3a31 parent 2dfdbc61 file · +8 −4Browse files

Unified · Split

src/formats.c+8−4
@@ -708,23 +708,27 @@ sox_format_handler_t const * sox_write_handler( · 707 unmodified lines
708708 sox_format_handler_t const * handler;
709709 if (filetype) {
710710 if (!(handler = sox_find_format(filetype, sox_false))) {
711− lsx_fail("no handler for given file type `%s'", filetype);
711+ if (filetype1)
712+ lsx_fail("no handler for given file type `%s'", filetype);
712713 return NULL;
713714 }
714715 }
715716 else if (path) {
716717 if (!(filetype = lsx_find_file_extension(path))) {
717− lsx_fail("can't determine type of `%s'", path);
718+ if (filetype1)
719+ lsx_fail("can't determine type of `%s'", path);
718720 return NULL;
719721 }
720722 if (!(handler = sox_find_format(filetype, sox_true))) {
721− lsx_fail("no handler for file extension `%s'", filetype);
723+ if (filetype1)
724+ lsx_fail("no handler for file extension `%s'", filetype);
722725 return NULL;
723726 }
724727 }
725728 else return NULL;
726729 if (!handler->startwrite && !handler->write) {
727− lsx_fail("file type `%s' isn't writeable", filetype);
730+ if (filetype1)
731+ lsx_fail("file type `%s' isn't writeable", filetype);
728732 return NULL;
729733 }
730734 if (filetype1)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t