File legacy_python.patch of Package nodejs16
27
1
Index: node-v16.5.0/tools/utils.py
2
===================================================================
3
--- node-v16.5.0.orig/tools/utils.py
4
+++ node-v16.5.0/tools/utils.py
5
6
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7
8
9
-import glob
10
import platform
11
import re
12
import sys
13
+from pathlib import Path
14
15
16
# Reads a .list file into an array of strings
17
18
19
20
def SearchFiles(dir, ext):
21
- list = glob.glob(dir+ '/**/*.' + ext, recursive=True)
22
+ list = Path(dir).glob('**/*.' + ext)
23
+ list = [ str(x) for x in list ]
24
if sys.platform == 'win32':
25
list = [ x.replace('\\', '/')for x in list]
26
return list
27