diff options
author | ringmaster <epithet@gmail.com> | 2013-10-08 20:48:59 +0400 |
---|---|---|
committer | ringmaster <epithet@gmail.com> | 2013-10-08 20:48:59 +0400 |
commit | c737b521abc782ffca73cf27b3382d6fc4c68946 (patch) | |
tree | 67bece3ac32848db019db0c857a1b6c155edd1a3 /apps/files_versions | |
parent | 76bdd6bc81bea48ba07d0cdd2a2496a911b914c7 (diff) |
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.
Diffstat (limited to 'apps/files_versions')
-rw-r--r-- | apps/files_versions/js/versions.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_versions/js/versions.js b/apps/files_versions/js/versions.js index 3f56a3eb698..6d25aec3152 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) ) { |