diff --git a/lib/private/server.php b/lib/private/server.php
index 3237ce30ccf2c9d43832cb05307114fe625bd28a..a2cf80aeea4c85cfbd981c90ca8b87f882879f79 100644
--- a/lib/private/server.php
+++ b/lib/private/server.php
@@ -280,9 +280,8 @@ class Server extends SimpleContainer implements IServerContainer {
 	 *
 	 * @return \OCP\Files\Folder
 	 */
-	function getAppFolder() {
-
-		$dir = '/' . \OC_App::getCurrentApp();
+	function getAppFolder($app) {
+		$dir = (!$app) ?  '/' . \OC_App::getCurrentApp() : \OC_APP::getAppPath($app); 
 		$root = $this->getRootFolder();
 		$folder = null;
 		if(!$root->nodeExists($dir)) {