diff --git a/lib/private/helper.php b/lib/private/helper.php
index f696b5a890020ec46466897478b624b8704a3379..1297d356d0948af36069b4579e2e9ddc1a66d80c 100644
--- a/lib/private/helper.php
+++ b/lib/private/helper.php
@@ -630,10 +630,10 @@ class OC_Helper {
 	 * temporary files are automatically cleaned up after the script is finished
 	 */
 	public static function tmpFolder() {
-		$path = get_temp_dir() . '/' . md5(time() . rand());
+		$path = get_temp_dir() . DIRECTORY_SEPARATOR . md5(time() . rand());
 		mkdir($path);
 		self::$tmpFiles[] = $path;
-		return $path . '/';
+		return $path . DIRECTORY_SEPARATOR;
 	}
 
 	/**