Doesn't recognise folder-scriptpacks

Issue #39 resolved
Fabian Maurer created an issue

I just unpacked my scriptpack (into a new folder), that way it worked with the 1.6.4 version, but doesn't for the 1.7.10 version. Only the zip works if using this version.

Comments (5)

  1. Chimaine

    Can't reproduce. Can you give me some more info? Like the folder name used and MobTalker2 log file (the Minecraft log file is pretty useless now).

  2. Fabian Maurer reporter

    My scriptpack (justin case you need it): Download

    Just extracted all the contents in a folder called "DarkShadow44"

    The important part of the log:

    23:19:32 [FEINER] [Proxy] onPreInit
    23:19:34 [FEINER] [Proxy] onInit
    23:19:34 [FEINER] [Proxy] onPostInit
    23:19:52 [FEINER] [Proxy] onServerAboutToStart
    23:19:52 [FEIN] [ScriptPackRepository] Loading ScriptPackRepository
    23:19:52 [FEINER] [ScriptPackRepository] Examinating 'resourcepacks\DarkShadow44' for a script pack
    23:19:52 [INFORMATION] [ScriptPack] Reading FolderScriptPack 'DarkShadow44'
    23:19:52 [WARNUNG] [ScriptPackRepository] Script pack at path 'E:\Spiele\Minecraft\instance-official\1.7.2_modTest\.minecraft\.\resourcepacks\DarkShadow44' has an invalid configuration: script path 'All/Generic.script' is not a valid sub-path of it's pack path
    

    Note the single dot in ".minecraft.\resourcepacks", this looks odd.

    Path of the mentioned file:

    E:\Spiele\Minecraft\instance-official\1.7.2_modTest\.minecraft\resourcepacks\DarkShadow44\All\Generic.script
    

    And the MobTalker2.pack contents

  3. Chimaine

    That dot is the path symbol for the current folder in the path, that shouldn't do anything (since it there for quite some time now). Still not able to reproduce though, will investigate further.

  4. Fabian Maurer reporter

    It shouldn't. But I figured out it certainly does.

    Take the following code to test it:

    File fileTest = new File("E:\\Spiele\\Minecraft\\instance-official\\1.7.2_modTest\\.minecraft\\resourcepacks\\DarkShadow44\\All\\Generic.script");
            File fileDir = new File("E:\\Spiele\\Minecraft\\instance-official\\1.7.2_modTest\\.minecraft\\resourcepacks\\DarkShadow44");
            File fileDirDot = new File("E:\\Spiele\\Minecraft\\instance-official\\1.7.2_modTest\\.minecraft\\.\\resourcepacks\\DarkShadow44");
    
            Path pathTest = fileTest.toPath();
            Path pathDir = fileDir.toPath();
            Path pathDirDot = fileDirDot.toPath();
    
            if(pathTest.startsWith(pathDir))
                System.out.println("Without dot works.");       
            else
                System.out.println("Without dot doesn't work.");
    
            if(pathTest.startsWith(pathDirDot))
                System.out.println("With dot works.");      
            else
                System.out.println("With dot doesn't work.");
    

    Output:

    Without dot works.
    With dot doesn't work.
    

    So it thinks it doesn't start with the path, and stops loading with an error.

    But no clue why it worked with the old version if you didn't change it, though..

  5. Log in to comment