mirror of
https://github.com/OpenDiablo2/OpenDiablo2
synced 2025-01-16 06:17:28 -05:00
Fix case sensitivity when loading MPQ files (#256)
* Fix case sensitivity when loading MPQ files * remove print
This commit is contained in:
parent
21cead11b9
commit
cead000c3f
@ -3,7 +3,6 @@ package d2core
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
|
||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
@ -92,12 +91,7 @@ func (am *assetManager) loadArchive(archivePath string) (*d2mpq.MPQ, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
stat, err := os.Stat(archivePath)
|
if err := am.archiveCache.insert(archivePath, archive, int(archive.Data.ArchiveSize)); err != nil {
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := am.archiveCache.insert(archivePath, archive, int(stat.Size())); err != nil {
|
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user