title: Artifactory creating folders instead of deploying artifact
body: <p>I have a plugin forked from artifactory jenkins plugin which deploys artifacts to artifactory. It was working fine for sometime now when I hit a weird issue a couple of days ago : I deploy my artifact to a layout and the plugin deploys fine but at the leaf level of the layout instead of deploying the artifact it makes that as an empty folder. </p>
  
  <p>I go into the logs and see the following:</p>
  
  <pre><code> (o.a.e.UploadServiceImpl:273) - MKDir request to 'yum-snapshot-local:rhel5/i386/packages//-1.12.13-d.34.i386.rpm'
      2015-06-04 00:00:10,219 [http-bio-8081-exec-1339] [INFO ] (o.a.e.UploadServiceImpl:279) - Directory 'yum-snapshot-local:rhel5/i386/packages//-1.12.13-d.34.i386.rpm' was created successfully.
      2015-06-04 00:00:11,326 [http-bio-8081-exec-1366] [INFO ] (o.a.r.r.c.BuildResource:286) - Adding build 'test #34'
      2015-06-04 00:00:11,550 [http-bio-8081-exec-1366] [INFO ] (o.a.r.r.c.BuildResource:303) - Added build 'test #34'
  </code></pre>
  
  <p>As you can see for some reason the plugin is making mkdir request instead of deploying and thats why creates empty directories but this just  a fork from 2.2.7 artifactory jenkins plugin.</p>
  
  <p>I use the older version of the plugin and that seems to deploy fine, log shows :</p>
  
  <pre><code>2015-06-03 23:48:00,458 [http-bio-8081-exec-1339] [INFO ] (o.a.e.UploadServiceImpl:479) - Deploy to 'libs-snapshot-
      local:djin/platforn/cande/FreeBSD/i386/packages/something/something-1.12.13-d.20.i386.rpm' Content-Length: 51
  </code></pre>
  
  <p>Any reason why it should suddenly make mkdir rquest? Also where can I find this "o.a.e.UploadServiceImpl" file ?</p>
  
  <p>EDIT 1.0</p>
  
  <p>much thanks, looks like the issue is here :</p>
  
  <pre><code>private void adjustResponseAndUpload(ArtifactoryRequest request, ArtifactoryResponse response,
              LocalRepo targetRepository) throws IOException {
          if (processOriginatedExternally(response)) {
              response = new DelayedHttpResponse((HttpArtifactoryResponse) response);
          }
          try {
              if (request.isDirectoryRequest()) {
                  createDirectory(request, response);
              } else if (request.isChecksum()) {
                  validateAndUploadChecksum(request, response, targetRepository);
              } else if (NamingUtils.isMetadata(request.getPath())) {
                  response.sendError(SC_CONFLICT, "Old metadata notation is not supported anymore: " +
                          request.getRepoPath(), log);
              } else {
                  uploadArtifact(request, response, targetRepository);
              }
  </code></pre>
  
  <p>if (request.isDirectoryRequest()) is returning true for some reason, hence its processing it as a folder, but for what good reason ? </p>