示例#1
0
def init() -> None:
    """Create the necessary directories."""
    global _files_directory, _info_directory
    _files_directory = os.path.join(xdg.user_data_dir(), "Trash/files")
    _info_directory = os.path.join(xdg.user_data_dir(), "Trash/info")
    os.makedirs(_files_directory, exist_ok=True)
    os.makedirs(_info_directory, exist_ok=True)
示例#2
0
def test_backup_directories(mock_gtk_version):
    migration.backup()
    gtk_name = "vimiv-gtk-backup"
    for directory in (
        xdg.user_config_dir(gtk_name),
        xdg.user_cache_dir(gtk_name),
        xdg.user_data_dir(gtk_name),
    ):
        assert os.path.isdir(directory)
示例#3
0
def init() -> None:
    """Create the necessary directories."""
    global _files_directory, _info_directory
    _files_directory = xdg.user_data_dir("Trash", "files")
    _info_directory = xdg.user_data_dir("Trash", "info")
    xdg.makedirs(_files_directory, _info_directory)