Skip to content

Commit

Permalink
Merge pull request #29 from mihem/fix_move_file
Browse files Browse the repository at this point in the history
fix move file
  • Loading branch information
DanChaltiel authored Nov 14, 2024
2 parents e10a2c8 + ff2456c commit e10db22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ importFrom(dplyr,summarise)
importFrom(dplyr,transmute)
importFrom(dplyr,ungroup)
importFrom(fs,file_exists)
importFrom(fs,file_move)
importFrom(fs,path)
importFrom(fs,path_dir)
importFrom(fs,path_temp)
Expand Down
3 changes: 2 additions & 1 deletion R/decision.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#' @export
#' @importFrom cli cli_inform
#' @importFrom rlang check_installed
#' @importFrom fs file_move
import_review = function(source_path="R/",
output_path=get_target_dir(),
background=getOption("autoimport_background", FALSE)) {
Expand Down Expand Up @@ -114,7 +115,7 @@ review_app = function(data_files){

shiny::observeEvent(input$accept, {
cli_inform(c(">"="Accepting modification of '{.file {old_path[[i()]]}}'"))
file.rename(new_path[[i()]], old_path[[i()]])
file_move(new_path[[i()]], old_path[[i()]])
update_cases()
})
shiny::observeEvent(input$skip, {
Expand Down

0 comments on commit e10db22

Please sign in to comment.