mirror of
https://github.com/Alvin-Zilverstand/Twitter-X-Media-Batch-Downloader.git
synced 2026-11-30 18:17:59 +01:00
v4.6
This commit is contained in:
1 parent
33be717065
commit
e05a9379fc
20 files changed
+1449
-611
No files matched your search
+9
-2
@@ -11,12 +11,19 @@ import (
|
||||
)
|
||||
|
||||
func OpenFolderInExplorer(path string) error {
|
||||
info, err := os.Stat(path)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !info.IsDir() {
|
||||
return os.ErrInvalid
|
||||
}
|
||||
|
||||
var cmd *exec.Cmd
|
||||
|
||||
switch runtime.GOOS {
|
||||
case "windows":
|
||||
|
||||
cmd = exec.Command("cmd", "/c", "start", "", path)
|
||||
cmd = exec.Command("explorer", path)
|
||||
case "darwin":
|
||||
cmd = exec.Command("open", path)
|
||||
case "linux":
|
||||
|
||||
Reference in new issue
Block a user