Uploaded image for project: 'SmartSprites'
  1. SmartSprites
  2. SMARTSPRITES-59

FileNotFoundException when using relative paths on Windows

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.2.5
    • Fix Version/s: 0.2.6
    • Labels:
      None

      Description

      When you call SmartSprites with a relative path on Windows it will crash, although the absolute path works fine.

      e.g. C:\workspace\smartsprites>smartsprites.cmd ..\web\WebSite\Root

      will produce:

      Exception in thread "main" java.io.FileNotFoundException: C:\workspace\web\
      WebSite\Root (Access is denied)
             at java.io.FileInputStream.open(Native Method)
             at java.io.FileInputStream.<init>(Unknown Source)
             at org.carrot2.labs.smartsprites.resource.FileSystemResourceHandler.getResourceAsInputStream(FileSystemResourceHandler.java:54)
             at org.carrot2.labs.smartsprites.resource.FileSystemResourceHandler.getResourceAsReader(FileSystemResourceHandler.java:61)
             at org.carrot2.labs.smartsprites.SpriteDirectiveOccurrenceCollector.collectSpriteImageOccurrences(SpriteDirectiveOccurrenceCollector.java:55)
             at org.carrot2.labs.smartsprites.SpriteDirectiveOccurrenceCollector.collectSpriteImageOccurrences(SpriteDirectiveOccurrenceCollector.java:164)
             at org.carrot2.labs.smartsprites.SpriteBuilder.buildSprites(SpriteBuilder.java:151)
             at org.carrot2.labs.smartsprites.SpriteBuilder.buildSprites(SpriteBuilder.java:121)
             at org.carrot2.labs.smartsprites.SmartSprites.main(SmartSprites.java:46)
      

      and C:\workspace\smartsprites>smartsprites.cmd C:\workspace\web\WebSite\Root functions well.

        Attachments

          Activity

            People

            • Assignee:
              stachoo Stanisław Osiński
              Reporter:
              stachoo Stanisław Osiński
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h
                1h