mirror of
https://github.com/pierre-emmanuelJ/iptv-proxy.git
synced 2026-03-13 06:35:29 +01:00
Add default OS tmp dir
Signed-off-by: Pierre-Emmanuel Jacquier <15922119+pierre-emmanuelJ@users.noreply.github.com>
This commit is contained in:
@@ -25,6 +25,7 @@ import (
|
||||
"net/url"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/jamesnetherton/m3u"
|
||||
@@ -35,7 +36,7 @@ import (
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
var defaultProxyfiedM3UPath = "/tmp/" + uuid.NewV4().String() + ".iptv-proxy.m3u"
|
||||
var defaultProxyfiedM3UPath = filepath.Join(os.TempDir(), uuid.NewV4().String()+".iptv-proxy.m3u")
|
||||
|
||||
// Config represent the server configuration
|
||||
type Config struct {
|
||||
|
||||
@@ -62,7 +62,7 @@ func (c *Config) cacheXtreamM3u(m3uURL *url.URL) error {
|
||||
tmp := *c
|
||||
tmp.playlist = &playlist
|
||||
|
||||
path := filepath.Join("/tmp", uuid.NewV4().String()+".iptv-proxy")
|
||||
path := filepath.Join(os.TempDir(), uuid.NewV4().String()+".iptv-proxy.m3u")
|
||||
f, err := os.Create(path)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user