summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Needham <needham.thomas@gmail.com>2012-09-18 22:08:34 +0000
committerTom Needham <needham.thomas@gmail.com>2012-09-18 22:08:34 +0000
commit8a74a39c4240f41799b333f65db66587ef5ad8b7 (patch)
treeb0a2269aab0f5c42f99e3fe851b611edd228f8ab
parent729b36e495dd753d304f5ad17c1b831bb27c4315 (diff)
downloadnextcloud-server-8a74a39c4240f41799b333f65db66587ef5ad8b7.tar.gz
nextcloud-server-8a74a39c4240f41799b333f65db66587ef5ad8b7.zip
Fix oc-1769, renaming folders with extensions
-rw-r--r--apps/files/js/filelist.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index f2b558496e0..6d4d5399639 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -157,7 +157,7 @@ var FileList={
tr.attr('data-file', newname);
var path = td.children('a.name').attr('href');
td.children('a.name').attr('href', path.replace(encodeURIComponent(name), encodeURIComponent(newname)));
- if (newname.indexOf('.') > 0) {
+ if (newname.indexOf('.') > 0 && tr.data('type') != 'dir') {
var basename=newname.substr(0,newname.lastIndexOf('.'));
} else {
var basename=newname;
@@ -166,7 +166,7 @@ var FileList={
var span=$('<span class="nametext"></span>');
span.text(basename);
td.children('a.name').append(span);
- if (newname.indexOf('.') > 0) {
+ if (newname.indexOf('.') > 0 && tr.data('type') != 'dir') {
span.append($('<span class="extension">'+newname.substr(newname.lastIndexOf('.'))+'</span>'));
}
tr.data('renaming',false);