summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-05-18 10:36:35 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2002-05-18 10:36:35 +0200
commit4da8a8e0666b3bfc1eac21aaf6a3aa66db02578c (patch)
tree951a983bad736cd528af35fdfcf7bbc361a8c135 /vdr.c
parent26a2d985243eed98276f0bc68dc7db6f61d87128 (diff)
downloadvdr-4da8a8e0666b3bfc1eac21aaf6a3aa66db02578c.tar.gz
vdr-4da8a8e0666b3bfc1eac21aaf6a3aa66db02578c.tar.bz2
Added an error message if the directory specified in the '-L' option can't be accessed
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/vdr.c b/vdr.c
index 7fffa6fa..5acd2241 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/people/kls/vdr
*
- * $Id: vdr.c 1.109 2002/05/13 16:32:49 kls Exp $
+ * $Id: vdr.c 1.110 2002/05/18 10:33:54 kls Exp $
*/
#include <getopt.h>
@@ -146,7 +146,12 @@ int main(int argc, char *argv[])
fprintf(stderr, "vdr: invalid log level: %s\n", optarg);
return 2;
break;
- case 'L': PluginManager.SetDirectory(optarg);
+ case 'L': if (access(optarg, R_OK | X_OK) == 0)
+ PluginManager.SetDirectory(optarg);
+ else {
+ fprintf(stderr, "vdr: can't access plugin directory: %s\n", optarg);
+ return 2;
+ }
break;
case 'm': MuteAudio = true;
break;