Skip to content

Commit c47ad23

Browse files
Escape file names in RECORD file
Ported from Xinya's change in PyTorch: pytorch/pytorch@4fca2d5 (cherry picked from commit 909d31d)
1 parent 8c71930 commit c47ad23

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

manywheel/build_common.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,11 +307,11 @@ make_wheel_record() {
307307
FPATH=$1
308308
if echo $FPATH | grep RECORD >/dev/null 2>&1; then
309309
# if the RECORD file, then
310-
echo "$FPATH,,"
310+
echo "\"$FPATH\",,"
311311
else
312312
HASH=$(openssl dgst -sha256 -binary $FPATH | openssl base64 | sed -e 's/+/-/g' | sed -e 's/\//_/g' | sed -e 's/=//g')
313313
FSIZE=$(ls -nl $FPATH | awk '{print $5}')
314-
echo "$FPATH,sha256=$HASH,$FSIZE"
314+
echo "\"$FPATH\",sha256=$HASH,$FSIZE"
315315
fi
316316
}
317317

manywheel/build_libtorch.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,11 @@ make_wheel_record() {
229229
FPATH=$1
230230
if echo $FPATH | grep RECORD >/dev/null 2>&1; then
231231
# if the RECORD file, then
232-
echo "$FPATH,,"
232+
echo "\"$FPATH\",,"
233233
else
234234
HASH=$(openssl dgst -sha256 -binary $FPATH | openssl base64 | sed -e 's/+/-/g' | sed -e 's/\//_/g' | sed -e 's/=//g')
235235
FSIZE=$(ls -nl $FPATH | awk '{print $5}')
236-
echo "$FPATH,sha256=$HASH,$FSIZE"
236+
echo "\"$FPATH\",sha256=$HASH,$FSIZE"
237237
fi
238238
}
239239

0 commit comments

Comments
 (0)