summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--showrgb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/showrgb.c b/showrgb.c
index 4796c5a..8f3fb81 100644
--- a/showrgb.c
+++ b/showrgb.c
@@ -135,7 +135,7 @@ dumprgb (const char *filename)
strcat(path, ".txt");
#endif
- if (!(rgb = fopen(path, "r"))) {
+ if (!(rgb = fopen(path, "r")) && !(rgb = fopen(filename, "r"))) {
fprintf (stderr, "%s: unable to open rgb database \"%s\"\n",
ProgramName, filename);
free(path);