[Pkg-owncloud-commits] [owncloud] 01/111: Don't double-slash filenames at the root. Replace either the end of the dir string that isn't preceded by a slash or the slash at the end of the dir string with a slash and the filename. This prevents the root directory from ending up as two slashes, which breaks files_versions on Windows servers. See #4079 for an explanation.
David Prévot
taffit at moszumanska.debian.org
Wed Nov 20 21:38:34 UTC 2013
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit c737b521abc782ffca73cf27b3382d6fc4c68946
Author: ringmaster <epithet at gmail.com>
Date: Tue Oct 8 12:48:59 2013 -0400
Don't double-slash filenames at the root.
Replace either the end of the dir string that isn't preceded by a slash or the slash at the end of the dir string with a slash and the filename.
This prevents the root directory from ending up as two slashes, which breaks files_versions on Windows servers. See #4079 for an explanation.
---
apps/files_versions/js/versions.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/files_versions/js/versions.js b/apps/files_versions/js/versions.js
index 3f56a3e..6d25aec 100644
--- a/apps/files_versions/js/versions.js
+++ b/apps/files_versions/js/versions.js
@@ -14,7 +14,7 @@ $(document).ready(function(){
// Action to perform when clicked
if (scanFiles.scanning){return;}//workaround to prevent additional http request block scanning feedback
- var file = $('#dir').val()+'/'+filename;
+ var file = $('#dir').val().replace(/(?!<=\/)$|\/$/, '/' + filename);
var createDropDown = true;
// Check if drop down is already visible for a different file
if (($('#dropdown').length > 0) ) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list