From fde7db2d14e66d5623d6e01c5047a9f68183ea9f Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 1 Aug 2012 12:12:09 +0900 Subject: [PATCH] refuse to run on a unc drive --- aqt/profiles.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/aqt/profiles.py b/aqt/profiles.py index a7e206001..1dca866ae 100644 --- a/aqt/profiles.py +++ b/aqt/profiles.py @@ -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)