package main

import (
	"os"
	"path/filepath"
)

func GetIndexPath() string {
	dataDir := os.Getenv("XDG_DATA_HOME")
	if dataDir == "" {
		home := os.Getenv("HOME")
		dataDir = filepath.Join(home, ".local", "share")
	}
	indexPath := filepath.Join(dataDir, "autoindex", "index.html")
	return indexPath
}
