We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6308cd0 commit 0d5aa7fCopy full SHA for 0d5aa7f
test/Driver/Dependencies/Inputs/touch.py
@@ -26,6 +26,12 @@
26
# From http://stackoverflow.com/a/1160227.
27
for filePathPattern in sys.argv[2:]:
28
# Support glob patterns if the shell did not expand them (like cmd.exe)
29
- for filePath in glob.glob(filePathPattern):
+ if glob.escape(filePathPattern) == filePathPattern:
30
+ # Not a glob pattern. We should touch that specific file.
31
+ filePaths = [ filePathPattern ]
32
+ else:
33
+ filePaths = glob.glob(filePathPattern)
34
+
35
+ for filePath in filePaths:
36
with open(filePath, 'a'):
37
os.utime(filePath, (timeVal, timeVal))
0 commit comments