# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2004-2007 Craig Barratt
+# Copyright (C) 2004-2009 Craig Barratt
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
#========================================================================
#
-# Version 3.1.0beta0, released 3 Sep 2007.
+# Version 3.2.0beta0, released 5 April 2009.
#
# See http://backuppc.sourceforge.net.
#
(my $dir = $file) =~ s{(.+)/(.+)}{$1};
- mkpath($dir, 0, 0775) if ( !-d $dir );
+ if ( !-d $dir ) {
+ eval { mkpath($dir, 0, 0775) };
+ return "TextFileWrite: can't create directory $dir" if ( $@ );
+ }
if ( open(FD, ">", "$file.new") ) {
binmode(FD);
print FD $contents;
delete($conf->{BlackoutWeekDays});
}
- #
- # Make sure IncrLevels is defined
- #
- $conf->{IncrLevels} = [1] if ( !defined($conf->{IncrLevels}) );
-
return (undef, $conf);
}