diff --git a/apps/user_migrate/js/export.js b/apps/user_migrate/js/export.js
index 2d660b2de6b4c154116d09db8ef60c4889b79ef1..aef45c45a7b05a204f5fe2c85e5286fe87d3afde 100644
--- a/apps/user_migrate/js/export.js
+++ b/apps/user_migrate/js/export.js
@@ -9,7 +9,7 @@ $(document).ready(function(){
 			function(result){
 				if(result.status == 'success'){
 					// Download the file
-					window.location = OC.filePath('user_migrate','ajax','export.php?operation=download')	;
+					window.location = OC.linkTo('user_migrate','ajax/export.php') + '?operation=download';
 					$('.loading').hide();
 					$('#exportbtn').val(t('user_migrate', 'Export'));
 				} else {