Commit 841bc142 authored by Grace Han's avatar Grace Han Committed by Ian Lance Taylor
Browse files

os: restore testErrNotExist's working directory on os.Chdir success

The existing implementation calls os.Chdir expecting the call not to
succeed. This change restores the original working directory in the
case that the call does succeed.

Fixes #45407

Change-Id: I61c57f6858b9a9058226e45e24276c7af8913048
Reviewed-on: https://go-review.googlesource.com/c/go/+/308849


Trust: Emmanuel Odeke <emmanuel@orijtech.com>
Run-TryBot: Emmanuel Odeke <emmanuel@orijtech.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent 263e13d1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment