Skip to content

Commit ba0e3b5

Browse files
author
Jose Quijada
committed
src: More succient way to get directory portion of file path
1 parent a2f13d0 commit ba0e3b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gyp/pylib/gyp/common.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ def __init__(self):
342342
# consequently ending up with current dir "/cygdrive/c/..." being prefixed to those, which was
343343
# obviously a non-existent path, for example: "/cygdrive/c/<some folder>/C:\<my win style abs path>".
344344
# See https://docs.python.org/2/library/tempfile.html#tempfile.mkstemp for more details
345-
base_temp_dir = "" if IsCygwin() else os.path.split(filename)[0]
345+
base_temp_dir = "" if IsCygwin() else os.path.dirname(filename)
346346
# Pick temporary file.
347347
tmp_fd, self.tmp_path = tempfile.mkstemp(
348348
suffix='.tmp',

0 commit comments

Comments
 (0)