Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions backend/utils/paths.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,30 @@ func DiscordPath(channel string) string {
}
}

// TODO: make this check and attempt to return the base path when full path doesn't exist
func BrowsePath(channel string) string {
var channelName = GetChannelName(channel)

var candidate = ""
switch op := runtime.GOOS; op {
case "windows":
return filepath.Join(os.Getenv("LOCALAPPDATA"), channelName)
candidate = filepath.Join(os.Getenv("LOCALAPPDATA"), channelName)
case "darwin", "linux":
return filepath.Join(Roaming, strings.ToLower(channelName))
candidate = filepath.Join(Roaming, strings.ToLower(channelName))
default:
candidate = ""
}

if Exists(candidate) {
return candidate
}

candidate, err := os.UserHomeDir()

if err != nil {
return ""
}

return candidate
}

func ValidatePath(proposed string) string {
Expand Down
113 changes: 0 additions & 113 deletions frontend/.eslintrc.js

This file was deleted.

23 changes: 23 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
node_modules

# Output
.output
.vercel
.netlify
.wrangler
/.svelte-kit
/build

# OS
.DS_Store
Thumbs.db

# Env
.env
.env.*
!.env.example
!.env.test

# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
Loading