diff --git a/R-package/src/install.libs.R b/R-package/src/install.libs.R index 14a49cc11ae8..d5cdc78dbe38 100644 --- a/R-package/src/install.libs.R +++ b/R-package/src/install.libs.R @@ -155,7 +155,7 @@ if (file.exists(src)) { if (dir.exists(build_dir)) { print("Removing 'build/' directory") unlink( - x = file.path(R_PACKAGE_SOURCE, "src", "build") + x = build_dir , recursive = TRUE , force = TRUE )