Skip to content

Commit

Permalink
"MDL-16907, force binary mode write in smb plugin for repository module"
Browse files Browse the repository at this point in the history
  • Loading branch information
dongsheng committed Oct 21, 2008
1 parent 7741692 commit 048ef25
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions repository/smb/repository.class.php
Expand Up @@ -32,13 +32,12 @@ public function get_file($url, $title) {
$file = uniqid('m').$file;
}

$fp = fopen($dir.$file, 'w');
$content = '';
$fp = fopen($url, 'r');
while (!feof($fp)) {
$content .= fread($fp, 1024*8);
}
$fp = fopen($dir.$file, 'w');
$fp = fopen($dir.$file, 'wb');
fwrite($fp, $content);
return $dir.$file;
}
Expand Down

0 comments on commit 048ef25

Please sign in to comment.