summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-06-07 23:57:23 +0800
committerGitHub <[email protected]>2022-06-07 23:57:23 +0800
commita3f81d902ec232527f7b21e08b33d97936fc98d2 (patch)
tree1086f636818fc3a32e2a7aae9e81db029e57a9c7
parentbd719aeb99018ec19e0d327be407430da96b3446 (diff)
parentda7a45347a82af5096bd0bf54a9713f7a1ee6843 (diff)
Merge pull request #2435 from coucya/master
fix the search bug when the package name has an extension name.
-rw-r--r--xmake/modules/private/action/require/impl/repository.lua2
-rw-r--r--xmake/scripts/update-script.bat11
2 files changed, 11 insertions, 2 deletions
diff --git a/xmake/modules/private/action/require/impl/repository.lua b/xmake/modules/private/action/require/impl/repository.lua
index f6ad1b777..5ead9d6fc 100644
--- a/xmake/modules/private/action/require/impl/repository.lua
+++ b/xmake/modules/private/action/require/impl/repository.lua
@@ -218,7 +218,7 @@ function searchdirs(name)
local dir = path.directory(file)
local subdirname = path.basename(path.directory(dir))
if #subdirname == 1 then -- ignore l/luajit/port/xmake.lua
- local packagename = path.basename(dir)
+ local packagename = path.filename(dir)
if not unique[packagename] then
table.insert(packageinfos, {name = packagename, repo = repo, packagedir = path.directory(file)})
unique[packagename] = true
diff --git a/xmake/scripts/update-script.bat b/xmake/scripts/update-script.bat
index 760db0817..91c5b8f3c 100644
--- a/xmake/scripts/update-script.bat
+++ b/xmake/scripts/update-script.bat
@@ -4,4 +4,13 @@ echo Removing old files
cd /d "%~1"
del actions core includes languages modules platforms plugins repository rules scripts templates themes /S /Q /F >nul
echo Copying from temp directory to "%~1"
-xcopy "%~2" "%~1" /S /Y /Q >nul \ No newline at end of file
+
+if exist "%WINDIR%\System32\Robocopy.exe" (
+ robocopy "%~2" "%~1" /S /IS /NFL /NDL /NJH /NJS >nul
+) else (
+ if exist "%WINDIR%\SysWOW64\Robocopy.exe" (
+ robocopy "%~2" "%~1" /S /IS /NFL /NDL /NJH /NJS >nul
+ ) else (
+ xcopy "%~2" "%~1" /S /Y /Q >nul
+ )
+)