SVN: UX improvements #136
@ -13,7 +13,6 @@ from ..threaded.background_process import Processes
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
class SVN_UL_repositories(UIList):
|
||||
def draw_item(
|
||||
self, context, layout, data, item, icon, active_data, active_propname
|
||||
@ -41,7 +40,16 @@ class SVN_OT_repo_add(Operator, ImportHelper):
|
||||
repos = prefs.repositories
|
||||
|
||||
path = Path(self.filepath)
|
||||
if not path.exists():
|
||||
# It's unlikely that a path that the user JUST BROWSED doesn't exist.
|
||||
# So, this actually happens when the user leaves a filename in the
|
||||
# file browser text box while trying to select the folder...
|
||||
# Basically, Blender is dumb, and it will add that filename to the
|
||||
# end of the browsed path. We need to discard that.
|
||||
path = path.parent
|
||||
if path.is_file():
|
||||
# Maybe the user actually did select an existing file in the repo.
|
||||
# We still want to discard the filename.
|
||||
path = path.parent
|
||||
|
||||
existing_repos = repos[:]
|
||||
|
Loading…
Reference in New Issue
Block a user