mirror of
https://github.com/OpenFactorioServerManager/factorio-server-manager.git
synced 2025-01-24 05:17:24 +02:00
Merge pull request #58 from sean-callahan/fix-save-bug
Fix nil pointer in saves
This commit is contained in:
commit
bd6a1f8ab5
@ -22,6 +22,7 @@ func (s Save) String() string {
|
|||||||
|
|
||||||
// Lists save files in factorio/saves
|
// Lists save files in factorio/saves
|
||||||
func listSaves(saveDir string) (saves []Save, err error) {
|
func listSaves(saveDir string) (saves []Save, err error) {
|
||||||
|
saves = []Save{}
|
||||||
err = filepath.Walk(saveDir, func(path string, info os.FileInfo, err error) error {
|
err = filepath.Walk(saveDir, func(path string, info os.FileInfo, err error) error {
|
||||||
if info.IsDir() && info.Name() == "saves" {
|
if info.IsDir() && info.Name() == "saves" {
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
x
Reference in New Issue
Block a user