From fe7391a646141f9ed1ee4792dc04da77ab90cf5f Mon Sep 17 00:00:00 2001 From: abhimanyuaryan <8083613+AbhimanyuAryan@users.noreply.github.com> Date: Mon, 22 May 2023 22:52:37 +0530 Subject: [PATCH 1/4] remove dir that contains .trashme --- src/GenieBuilder.jl | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/GenieBuilder.jl b/src/GenieBuilder.jl index 3b4a4eff..86cd18cf 100755 --- a/src/GenieBuilder.jl +++ b/src/GenieBuilder.jl @@ -91,14 +91,11 @@ function postinstall() end for app in readdir(APPS_FOLDER[]) - trashme_file = joinpath(APPS_FOLDER[], app, ".trashme") - if isfile(trashme_file) - modified_app_name = open(trashme_file) do io - strip(read(io, String)) - end - - mv(joinpath(APPS_FOLDER[], app), joinpath(TRASH_FOLDER[], modified_app_name)) - rm(joinpath(TRASH_FOLDER[], modified_app_name, ".trashme")) + app_path = joinpath(APPS_FOLDER[], app) + @info "🚀🚀🚀🚀🚀 $app_path)" + + if isfile(joinpath(app_path, ".trashme")) + rm(app_path, recursive=true) end end end From 78add189476d9d0582e3a18429d0b59e7c451086 Mon Sep 17 00:00:00 2001 From: abhimanyuaryan <8083613+AbhimanyuAryan@users.noreply.github.com> Date: Mon, 22 May 2023 22:54:01 +0530 Subject: [PATCH 2/4] remove log --- src/GenieBuilder.jl | 1 - 1 file changed, 1 deletion(-) diff --git a/src/GenieBuilder.jl b/src/GenieBuilder.jl index 86cd18cf..14823952 100755 --- a/src/GenieBuilder.jl +++ b/src/GenieBuilder.jl @@ -92,7 +92,6 @@ function postinstall() for app in readdir(APPS_FOLDER[]) app_path = joinpath(APPS_FOLDER[], app) - @info "🚀🚀🚀🚀🚀 $app_path)" if isfile(joinpath(app_path, ".trashme")) rm(app_path, recursive=true) From 304d772f2084e25d4c5501541384c9fdb12d2eeb Mon Sep 17 00:00:00 2001 From: abhimanyuaryan <8083613+AbhimanyuAryan@users.noreply.github.com> Date: Mon, 22 May 2023 23:16:27 +0530 Subject: [PATCH 3/4] force move the app --- app/resources/applications/ApplicationsController.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/resources/applications/ApplicationsController.jl b/app/resources/applications/ApplicationsController.jl index 864cf69e..e89b874f 100755 --- a/app/resources/applications/ApplicationsController.jl +++ b/app/resources/applications/ApplicationsController.jl @@ -433,7 +433,7 @@ function move_to_folder(app, from_folder, to_folder) try modify_app_fields(app, Dict("name" => app_new_name, "path" => joinpath(to_folder, ""))) - mv(app_path, joinpath(to_folder, app_new_name)) + mv(app_path, joinpath(to_folder, app_new_name), force = true) catch err open(joinpath(app_path, ".trashme"), "w") do io write(io, app_new_name) From 71d0303c6a470bc8d556373479b5b79b2e22f573 Mon Sep 17 00:00:00 2001 From: abhimanyuaryan <8083613+AbhimanyuAryan@users.noreply.github.com> Date: Mon, 22 May 2023 23:24:02 +0530 Subject: [PATCH 4/4] undo force because it remove existing dir --- app/resources/applications/ApplicationsController.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/resources/applications/ApplicationsController.jl b/app/resources/applications/ApplicationsController.jl index e89b874f..864cf69e 100755 --- a/app/resources/applications/ApplicationsController.jl +++ b/app/resources/applications/ApplicationsController.jl @@ -433,7 +433,7 @@ function move_to_folder(app, from_folder, to_folder) try modify_app_fields(app, Dict("name" => app_new_name, "path" => joinpath(to_folder, ""))) - mv(app_path, joinpath(to_folder, app_new_name), force = true) + mv(app_path, joinpath(to_folder, app_new_name)) catch err open(joinpath(app_path, ".trashme"), "w") do io write(io, app_new_name)