ZyX_I committed bccfcbd

@/resources: Added check for already defined resources

Comments (0)

Files changed (2)


                 \               'использование косой черты в имени '.
                 \               'ресурса запрещено',
                 \  'ridexists': 'Ошибка создания ресурса %s дополнения %s: '.
-                \               'данный ресурс уже создан дополнением %s',
+                \               'данный ресурс уже создан',
                 \  'invrcpfun': 'Ошибка создания ресурса %s дополнения %s: '.
                 \               'дополнительный аргумент неверен',
                 \   'ridslash': 'Error while posting resource for plugin %s: '.
                 \               'slashes are not allowed in resource name',
                 \  'ridexists': 'Error while posting resource %s '.
-                \               'for plugin %s: resource was already defined '.
-                \               'by plugin %s',
+                \               'for plugin %s: resource was already defined',
                 \  'invrcpfun': 'Error while posting resource %s '.
                 \               'for plugin %s: invalid copy function',
         call s:_f.throw('ridnstr',
     elseif empty(a:rid)
         call s:_f.throw('ridempty',
+    elseif has_key(a:fdict, a:rid)
+        call s:_f.throw('ridexists',, a:rid)
     elseif a:0 && a:1 isnot 1 && a:1 isnot 0 && !exists('*a:1')
         call s:_f.throw('invrcpfun')


 .1: plugin/frawor/resources:ridnstr
 .2: plugin/frawor/resources:ridnstr
+.3: plugin/frawor/resources:ridexists
 .4: plugin/frawor/resources:ridempty
 .5: plugin/frawor/resources:invrcpfun
 .6: plugin/frawor/resources:invrcpfun
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.