diff options
author | Robin Appelman <icewind1991@gmail.com> | 2011-01-04 22:42:26 +0100 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2011-01-04 22:42:26 +0100 |
commit | 49c2efee271b700faa8f46bf2bb89fca75f84b70 (patch) | |
tree | e041985e8f8b54eaea8cd48fd96d78420bac5f74 /js | |
parent | b705b95a1e3a2c16287951bafede3f5598737777 (diff) | |
parent | ca791d32d83da3abab5071e2b4719be34227a1e5 (diff) | |
download | nextcloud-server-49c2efee271b700faa8f46bf2bb89fca75f84b70.tar.gz nextcloud-server-49c2efee271b700faa8f46bf2bb89fca75f84b70.zip |
Merge branch 'master' of git://gitorious.org/owncloud/owncloud
Diffstat (limited to 'js')
-rw-r--r-- | js/lib_files.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/js/lib_files.js b/js/lib_files.js index 8f7f9035585..54af643272a 100644 --- a/js/lib_files.js +++ b/js/lib_files.js @@ -225,6 +225,10 @@ OC_FILES.newFile=function(type,name,dir){ arg=new Object; arg.name=name; arg.dir=dir; + if(OC_FILES.cache.files[name]){//check if the file already exists + alert(((type=='dir')?'folder ':'file ')+name+' already exists.'); + return; + } arg.type=type; OC_API.run('new',{dir:dir,name:name,type:type},OC_FILES.new_callback,arg) if(!OC_FILES.cache.incomplete[dir]){ |