From eb5fcaa02cac3bc8d57d081b34dd7d8956398dd5 Mon Sep 17 00:00:00 2001 From: Josh Faust Date: Thu, 14 Aug 2014 14:23:09 -0700 Subject: [PATCH] Resolve symlinks before running p4 commands on a file --- Perforce.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Perforce.py b/Perforce.py index 821fbe3..c90b19f 100644 --- a/Perforce.py +++ b/Perforce.py @@ -229,7 +229,7 @@ def AppendToChangelistDescription(changelist, input): return 1, result def PerforceCommandOnFile(in_command, in_folder, in_filename): - command = ConstructCommand('p4 {0} "{1}"'.format(in_command, in_filename)) + command = ConstructCommand('p4 {0} "{1}"'.format(in_command, os.path.realpath(in_filename))) p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=global_folder, shell=True) result, err = p.communicate() result = result.decode("utf-8")