Skip to content

Conversation

@wpkelso
Copy link
Owner

@wpkelso wpkelso commented Jun 16, 2025

Fixes #20 , #21

@wpkelso wpkelso changed the title Use specific autosave dir Use specific autosave dir & dont try to open directories Jun 16, 2025
@wpkelso wpkelso marked this pull request as ready for review June 16, 2025 18:32
@ryonakano
Copy link
Contributor

There are some leftovers in Window.vala, don't we need to replace them to Application.data_dir_path? 🤔

ryo@b760m:~/work/tmp/slate (autosave-dir =)$ git grep Environment
src/Application.vala:    public static string data_dir_path = Environment.get_user_data_dir () + "/slate";
src/Window.vala:        bool delete_after = (Environment.get_user_data_dir () in this.file.get_path ());
src/Window.vala:        bool is_unsaved_doc = (Environment.get_user_data_dir () in this.file.get_path ());
ryo@b760m:~/work/tmp/slate (autosave-dir =)$

@wpkelso
Copy link
Owner Author

wpkelso commented Jun 17, 2025

There are some leftovers in Window.vala, don't we need to replace them to Application.data_dir_path? 🤔

Ah, yeah, looks like I missed those two 😅

@wpkelso wpkelso requested a review from ryonakano June 17, 2025 13:47
Copy link
Contributor

@ryonakano ryonakano left a comment

Choose a reason for hiding this comment

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

Thanks for the fix, almost LGTM but I proposed #23 for an edge case.

@wpkelso wpkelso requested a review from ryonakano June 17, 2025 17:47
wpkelso and others added 2 commits June 18, 2025 02:20
Co-authored-by: Ryo Nakano <[email protected]>
@wpkelso wpkelso merged commit fe9626d into main Jun 18, 2025
3 checks passed
@wpkelso wpkelso deleted the autosave-dir branch June 18, 2025 02:25
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.

Don't use the rootdir of Environment.get_user_data_dir() as the autosave directory Don't try to open directory

3 participants