XZise added a comment. It's the latter. It tries to create that directory if the file path is not a directory(*) so there is definitely no user-config in it. So my suggestion would be to inform the user and to skip it. Now regarding informing the user I'm not 100 % sure when we should do that. We could do it always which might be noisy for those who use the home directories and the problematic directory is tested first. So my suggestion would be to silently(**) skip it if it could find a user-config somewhere else.
*: So yeah in theory if you do `touch ~/.pywikibot` it'll try to create a directory `~/.pywikibot` because it's not a directory (and I haven't tested that but it'll most likely fail) **: Unfortunately we can't use `pywikibot.log` or similar so I don't think there is a good way to warn only to a log or similar instead of just not warning. TASK DETAIL https://phabricator.wikimedia.org/T105159 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: XZise Cc: valhallasw, Aklapper, pywikibot-bugs-list, XZise, jayvdb, Malyacko, P.Copp _______________________________________________ pywikibot-bugs mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/pywikibot-bugs
