Ejemplo n.º 1
0
def ensureDirExists(myDir):
    """creates a dir subdirectory of plugins/JxPlugin/ if it doesn't exist"""
    path = os.path.join(os.path.dirname(__file__ ), myDir)
    if not(os.path.isdir(path)):
        try:
            os.mkdir(path)
        except OSError:
            showWarning("Couldn't create the '" + myDir + "' directory.")
Ejemplo n.º 2
0
def ensureDirExists(myDir):
    """creates a dir subdirectory of plugins/JxPlugin/ if it doesn't exist"""
    path = os.path.join(mw.config.configPath, "plugins", "JxPlugin", myDir)
    if not (os.path.isdir(path)):
        try:
            os.mkdir(path)
        except OSError:
            showWarning("Couldn't create the '" + myDir + "' directory.")
Ejemplo n.º 3
0
def ensure_dir_exists(dir):
    """creates a dir subdirectory of plugins/JxPlugin/ if it doesn't exist"""
    path = os.path.join(mw.config.configPath, "plugins","JxPlugin",dir)
    if not(os.path.isdir(path)):
        try:
            os.mkdir(path)
        except OSError:
            # big troubles ahead... raise an error message
            pass
            from ankiqt.ui.utils import showWarning
            showWarning("Couldn't create the '" + dir + "' directory.")