Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:lighthomo
musicfox
xdg.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xdg.patch of Package musicfox
--- internal/player/beep_player.go.orig 2024-07-11 21:18:51.572367820 +0800 +++ internal/player/beep_player.go 2024-07-11 21:20:35.747829646 +0800 @@ -99,7 +99,7 @@ panic(err) } - cacheFile := filepath.Join(app.DataRootDir(), "music_cache") + cacheFile := filepath.Join(app.TmpDir(), "music_cache") for { select { case <-p.close: --- utils/app/app.go.orig 2024-07-11 20:46:50.306349763 +0800 +++ utils/app/app.go 2024-07-11 21:12:56.475112534 +0800 @@ -49,7 +49,14 @@ } return cacheDir } - +func TmpDir() string { + tmp := os.TempDir() + tmpDir := filepath.Join(tmp, types.AppLocalDataDir) + if _, err := os.Stat(tmpDir); os.IsNotExist(err) { + _ = os.MkdirAll(tmpDir, os.ModePerm) + } + return tmpDir +} func DownloadDir() string { downloadDir := configs.ConfigRegistry.Main.DownloadDir if downloadDir == "" { --- utils/app/qrcode.go.orig 2024-07-11 21:19:23.686357300 +0800 +++ utils/app/qrcode.go 2024-07-11 21:20:52.934847475 +0800 @@ -7,7 +7,7 @@ ) func GenQRCode(filename, content string) (string, error) { - localDir := DataRootDir() + localDir := TmpDir() qrcodePath := filepath.Join(localDir, filename) if err := qrcode.WriteFile(content, qrcode.Medium, 256, qrcodePath); err != nil { return "", err --- utils/notify/notification.go.orig 2024-07-11 21:19:45.786808852 +0800 +++ utils/notify/notification.go 2024-07-11 21:21:13.138593607 +0800 @@ -127,18 +127,8 @@ }) if runtime.GOOS != "darwin" { - localDir := app.DataRootDir() - content.Icon = filepath.Join(localDir, configs.ConfigRegistry.Main.NotifyIcon) - if _, err := os.Stat(content.Icon); os.IsNotExist(err) { - content.Icon = filepath.Join(localDir, types.DefaultNotifyIcon) - // 写入logo文件 - err = filex.CopyFileFromEmbed("embed/logo.png", content.Icon) - if err != nil { - log.Printf("copy logo.png failed, err: %+v", errors.WithStack(err)) - } - } else if err != nil { - log.Printf("logo.png status err: %+v", errors.WithStack(err)) - } + localDir := filepath.Join("/usr", "share", "pixmaps") + content.Icon = filepath.Join(localDir, "musicfox.png") } _ = notify.Push(notificator.UrNormal, content.Title, content.Text, content.Icon, content.Url, content.GroupId) --- utils/slogx/slog.go.orig 2024-07-11 21:20:08.647275933 +0800 +++ utils/slogx/slog.go 2024-07-11 21:29:12.794802292 +0800 @@ -11,7 +11,7 @@ ) func init() { - dir := app.DataRootDir() + dir := app.TmpDir() f, err := os.OpenFile(filepath.Join(dir, "musicfox.log"), os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0666) if err != nil {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor