Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/trash dir #46

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Feature/trash dir #46

wants to merge 4 commits into from

Conversation

AbhimanyuAryan
Copy link
Member

@AbhimanyuAryan AbhimanyuAryan commented May 8, 2023

tested on windows/macOS. Can be merged

@@ -286,6 +290,8 @@ function unwatch(path, appid)
end

function start(app)
@info "inside start"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove all these debug messages please

app_path = joinpath(from_folder, app.name)

if !isdir(app_path)
@error "File '$app' is not a directory."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this rethrow and break? This will just continue even if the dir does not exist...


if(isdir(joinpath(to_folder, app.name)))
timestamp = now() |> (dt -> trunc(dt, Minute)) |> (dt -> Dates.format(dt, "yyyy-mm-ddTHH:MM")) |> (s -> replace(s, r"[-:]" => ""))
app_new_name = app.name * timestamp
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we should have a separator between app name and timestamp, like __ so we can split/undo the change.

@essenciary
Copy link
Member

@AbhimanyuAryan How do we handle the restore? When we undelete an app - it should reverse the changes. Move out of trash, remove timestamp from app name, etc.

@AbhimanyuAryan
Copy link
Member Author

AbhimanyuAryan commented May 12, 2023

can merge ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants