Commit 2d3bd3e4 authored by Alexandre Julliard's avatar Alexandre Julliard

wineprefixcreate: Only create links for files that don't exist.

Make a copy instead of a link if the original file is writable.
parent ab5ca5c0
......@@ -145,7 +145,16 @@ done
link_app()
{
rm -f "$2" && ln -s "$dlldir/$1.exe.so" "$2" || echo "Warning: failed to create $2"
if [ ! -f "$2" ]
then
# make a copy if the original is writable
if [ -w "$dlldir/$1.exe.so" ]
then
cp "$dlldir/$1.exe.so" "$2" || echo "Warning: failed to create $2"
else
ln -s "$dlldir/$1.exe.so" "$2" || echo "Warning: failed to create $2"
fi
fi
}
link_app start "$CROOT/windows/command/start.exe"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment