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
|
self.name = None
|
||||||
# instantiate base folder
|
# instantiate base folder
|
||||||
self.base = base or self._defaultBase()
|
self.base = base or self._defaultBase()
|
||||||
|
self.ensureLocalFS()
|
||||||
self.ensureBaseExists()
|
self.ensureBaseExists()
|
||||||
# load metadata
|
# load metadata
|
||||||
self.firstRun = self._loadMeta()
|
self.firstRun = self._loadMeta()
|
||||||
|
@ -71,6 +72,15 @@ class ProfileManager(object):
|
||||||
# Base creation
|
# 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):
|
def ensureBaseExists(self):
|
||||||
try:
|
try:
|
||||||
self._ensureExists(self.base)
|
self._ensureExists(self.base)
|
||||||
|
|
Loading…
Reference in a new issue