Noitidart / Profilist

ff-addon: Profile manager for Australis
https://addons.mozilla.org/en-US/firefox/addon/profilist/?src=github
34 stars 1 forks source link

Can't remove profile button if its folder is missing #9

Closed Keith94 closed 10 years ago

Keith94 commented 10 years ago

If a profile's folder is moved/deleted in Windows Explorer, Profilist should be able to remove its button from the Panel UI, instead of just failing like this:

fails like this

Otherwise I would have to edit profiles.ini file to prevent the non-existant profiles from displaying in the Panel UI.

Noitidart commented 10 years ago

Interesting. Thanks for this report man.

Can you please tell me how to replicate this error.

By moved/deleted in explorer, do you mean if the profile is deleted by something other than Profilist that it should be able to detect that it's gone and make the necessary adjustment to proflies.ini?

Keith94 commented 10 years ago

Can you please tell me how to replicate this error.

  1. Create new profile via Profilist button.
  2. Close the Firefox window that launched from it.
  3. Navigate to %APPDATA%\Mozilla\Firefox\Profiles and delete the profile folder that was created.
  4. Try to delete the profile from the Panel UI, like how you explained in the add-on description.

By moved/deleted in explorer, do you mean if the profile is deleted by something other than Profilist that it should be able to detect that it's gone and make the necessary adjustment to proflies.ini?

Yes that does sound like it should be the expected behavior.

Noitidart commented 10 years ago

Ah ok. I think this is between bug/enhancement because I intended for all profile creating/deleting/renaming to happen from Profilist. I didn't foresee people using multiple tools (and direct OS methods) to do this. Let's aim for this feature sometime after v1.1 please. So maybe v1.2.

Keith94 commented 10 years ago

Sounds good.

Noitidart commented 10 years ago

Hey @Keith94, I was thinking about handling corrupt deletions etc, and there are just so many possibilities/ways a person can corrupt it. I'm thinking that when 3rd party tools do delete a profile, they will do so properly, as in they will also edit profiles.ini. If the 3rd party tool works right, then Profilist doesn't have the issue of left over button, in fact, if it properly deletes it, then the button automatically disappears.

This is good for error handling/corrupt stuff, but I don't think this is a bug.

If you want to delete manually on OS, you should do it correctly:

So I'm thinking this is not a bug or enhancement anymore? What do you think I need your help on this.

Keith94 commented 10 years ago

Well I thought if maybe the profile folder was missing and you try to delete it with Profilist, it could instead remove that entry from profiles.ini. Much like how the Delete Profile button works when launching Firefox with -p command-line argument:

snag 2014 05 04 12 30 13

But if you don't like that idea, then I won't mind if you close this issue.

Noitidart commented 10 years ago

Ah you're right, if it tries to delete and it finds its already deleted, then it shouldn't say error deleting, it should realize it's already gone. You're right, I'll fix that. :) I just got intimidated by all the possible ways people can corrupt profiles and having to try to catch them all haha.

Noitidart commented 10 years ago

@Keith94 hey man, please install and test out pacth-5 from my yajd account.

  1. Install the addon "GitHub Extensions Installer" from here: https://addons.mozilla.org/en-US/firefox/addon/github-extension-installer/
  2. Then go to the GitHub repository: https://github.com/yajd/Profilist/tree/patch-5
  3. And then click on "Add to Firefox" it will install the addon to Firefox.

Please test the deleting, I tested it but you're the deleting profile bug catching expert! Please share your findings. :)

Keith94 commented 10 years ago

Hey,

Well I ain't no expert, but I can tell you that it successfully removes them without any error now, so that's working good :)

Btw with that patch if I try to delete a profile that is in use, Profilist tells me it was deleted instead of warning me that it's still in use.

Noitidart commented 10 years ago

Perfect testing man thanks for the detail on the if in use, I'll look into that. You're better test than me because I missed that! :) Please let me know if anything else comes up.

yajd commented 10 years ago

Ok man updated. Please install and test, let me know if anything else comes up. repo: https://github.com/yajd/Profilist/tree/patch-5

Keith94 commented 10 years ago

If a root folder is missing and I attempt to load the profile, it shouldn't display a "launching profile" notification.

Noitidart commented 10 years ago

Man you are so good! Thanks for that find I'll try to address that. Having some lunch right now. :)

Noitidart commented 10 years ago

Hey man for the issue where it shouldn't say "launching profile", it actually is launching it, but in process of launch it finds its corrupt and throws error message. We can make a seperate issue for that though, can you please make that topic. I'll close this topic as soon as i merge patch-5 as we addressed the issue of deletin when folder is missing.