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

Handle deleted directories #30

Open
diversys opened this issue Oct 20, 2015 · 6 comments
Open

Handle deleted directories #30

diversys opened this issue Oct 20, 2015 · 6 comments

Comments

@diversys
Copy link
Member

If folder containing a file was deleted and recreated in the background (as it often happens with haikuporter -c) Pe fails to save currently opened file. To reproduce:

echo text > folder/file.c
lpe folder/file.c &
rm -rf folder ; mkdir folder

Extremely annoying :/

@scottmc
Copy link
Member

scottmc commented Jan 2, 2016

So what "should" it do? Recreate the missing folder and then try to save there, or switch to "Save As..." mode when an attempt to save is made of an open file but it's directory is now missing? I would assume we've want the second option.

@diversys
Copy link
Member Author

diversys commented Jan 3, 2016

The second option should be fine

hannahyp added a commit to hannahyp/Pe that referenced this issue Jan 9, 2016
mmuman added a commit that referenced this issue Jan 10, 2016
fixed issue #30 (handle deleted directories)
@mmuman
Copy link
Member

mmuman commented Jan 10, 2016

Should be fixed now, merged #36, please test.

@scottmc
Copy link
Member

scottmc commented Jan 29, 2018

Seems to work.

@scottmc scottmc closed this as completed Jan 29, 2018
@diversys
Copy link
Member Author

Now that I used this feature I would prefer Pe to recreate the missing folder and then try to save there.

@diversys diversys reopened this Jan 30, 2018
@scottmc
Copy link
Member

scottmc commented Jan 30, 2018

so then the test case becomes:

echo text > folder/file.c
lpe folder/file.c &
rm -rf folder
then try to save file in Pe

I think it's safer to go to a "Save As..." condition, since there may be reasons why a folder disappeared while the file was open in Pe. Blindly recreating that folder could lead to other unforeseen issues. Opening up the "Save As..." view gives the user a chance to figure out how to solve the issue. Perhaps it was on a disk that has now been ejected.

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

No branches or pull requests

3 participants