diff --git a/aqt/profiles.py b/aqt/profiles.py index 365bc8f8f..9f6add370 100644 --- a/aqt/profiles.py +++ b/aqt/profiles.py @@ -61,7 +61,6 @@ class ProfileManager(object): self.base = os.path.abspath(base) else: self.base = self._defaultBase() - self.ensureLocalFS() self.ensureBaseExists() # load metadata self.firstRun = self._loadMeta() @@ -75,15 +74,6 @@ class ProfileManager(object): # Base creation ###################################################################### - def ensureLocalFS(self): - if self.base.startswith("\\\\"): - QMessageBox.critical( - None, "Error", """\ -To use Anki on a network share, the share must be mapped to a local drive \ -letter. Please see the 'File Locations' section of the manual for more \ -information.""") - raise Exception("unc") - def ensureBaseExists(self): try: self._ensureExists(self.base) diff --git a/aqt/utils.py b/aqt/utils.py index 95995e41d..2868440c8 100644 --- a/aqt/utils.py +++ b/aqt/utils.py @@ -330,10 +330,11 @@ def applyStyles(widget): def getBase(col): base = None mdir = col.media.dir() - if isWin: + if isWin and not mdir.startswith("\\\\"): prefix = u"file:///" else: prefix = u"file://" + mdir = mdir.replace("\\", "/") base = prefix + unicode( urllib.quote(mdir.encode("utf-8")), "utf-8") + "/"