From e53ce3e6f590bc575a732c97acafdc7803bacae3 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 29 Jul 2011 15:19:20 +1000 Subject: XOrg: return errors when writing to config file Signed-off-by: Peter Hutterer --- XOrg/ConfigGenerator.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'XOrg') diff --git a/XOrg/ConfigGenerator.pm b/XOrg/ConfigGenerator.pm index 4959f2e..a136113 100644 --- a/XOrg/ConfigGenerator.pm +++ b/XOrg/ConfigGenerator.pm @@ -56,9 +56,10 @@ sub save { $filename = $self->DEFAULT_CONFIG_FILE if not defined $filename; } - open FILE, "> $filename"; + open FILE, "> $filename" or return 0; print FILE $self->print; close FILE; + return 1; } -- cgit v1.2.3