Skip to content

Commit

Permalink
Prevent dangling symlink creation
Browse files Browse the repository at this point in the history
When `$srcdir` is a relative path, the path written by `ln` is invalid w.r.t. the symlink directory. Use an absolute path instead.
  • Loading branch information
anna-kartynnik committed Oct 7, 2021
1 parent 7547a90 commit 78adc6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion egs/wsj/s5/utils/subset_data_dir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ else
# Select $numutt shortest utterances.
. ./path.sh
if [ -f $srcdir/utt2num_frames ]; then
ln -sf $srcdir/utt2num_frames $destdir/tmp.len
ln -sf $(readlink -f $srcdir)/utt2num_frames $destdir/tmp.len
else
feat-to-len scp:$srcdir/feats.scp ark,t:$destdir/tmp.len || exit 1;
fi
Expand Down

0 comments on commit 78adc6e

Please sign in to comment.