Skip to content

Commit

Permalink
main
Browse files Browse the repository at this point in the history
  • Loading branch information
crazy-max committed Nov 22, 2024
1 parent f19bda2 commit 0c30f14
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/crazy-max/go-longpath-win

go 1.20
22 changes: 22 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//go:build windows
// +build windows

package main

import (
"fmt"
"os"
"path/filepath"
)

func main() {
tmpDir := os.TempDir()
wd, _ := os.Getwd()
fmt.Printf("TempDir: %s\n", tmpDir)
fmt.Printf("WorkingDir: %s\n", wd)

tmpDirSym, _ := filepath.EvalSymlinks(tmpDir)
wdSym, _ := filepath.EvalSymlinks(wd)
fmt.Printf("TempDirEvalSymlinks: %s\n", tmpDirSym)
fmt.Printf("WorkingDirEvalSymlinks: %s\n", wdSym)
}

0 comments on commit 0c30f14

Please sign in to comment.