aboutsummaryrefslogtreecommitdiffstats
path: root/config/filer
diff options
context:
space:
mode:
Diffstat (limited to 'config/filer')
-rw-r--r--config/filer/filer.inc6
1 files changed, 2 insertions, 4 deletions
diff --git a/config/filer/filer.inc b/config/filer/filer.inc
index 906928f2..b4512a49 100644
--- a/config/filer/filer.inc
+++ b/config/filer/filer.inc
@@ -54,7 +54,7 @@ function sync_package_filer() {
if($config['installedpackages']['filer']['config']!="") {
foreach($config['installedpackages']['filer']['config'] as $file) {
$fname = $file['fullfile'];
- $fdata = base64_decode($file['filedata']);
+ $fdata = str_replace("\r", "", base64_decode($file['filedata']));
if($file['mod']) {
if(!preg_match("/0?[0-7]{3}/", $file['mod']))
$mod = 0700;
@@ -62,9 +62,7 @@ function sync_package_filer() {
$mod = octdec($file['mod']);
}
conf_mount_rw();
- $fhnd = fopen($fname, 'w');
- fwrite($fhnd, $fdata);
- fclose($fhnd);
+ file_put_contents($fname, $fdata);
if($mod)
chmod($fname, $mod);
conf_mount_ro();