mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
refuse to run on a unc drive
This commit is contained in:
parent
269fb29901
commit
fde7db2d14
1 changed files with 10 additions and 0 deletions
|
@ -58,6 +58,7 @@ class ProfileManager(object):
|
|||
self.name = None
|
||||
# instantiate base folder
|
||||
self.base = base or self._defaultBase()
|
||||
self.ensureLocalFS()
|
||||
self.ensureBaseExists()
|
||||
# load metadata
|
||||
self.firstRun = self._loadMeta()
|
||||
|
@ -71,6 +72,15 @@ 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)
|
||||
|
|
Loading…
Reference in a new issue