Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Archivos.py
diff options
context:
space:
mode:
Diffstat (limited to 'Archivos.py')
-rw-r--r--Archivos.py20
1 files changed, 4 insertions, 16 deletions
diff --git a/Archivos.py b/Archivos.py
index 14af21a..7253315 100644
--- a/Archivos.py
+++ b/Archivos.py
@@ -19,13 +19,12 @@ PENDRIVE = os.path.join(DIRECCION, 'pendrive.svg')
DIR_SIN_PER = os.path.join(DIRECCION, 'directory_dennied.svg')
FILE_SIN_PER = os.path.join(DIRECCION, 'file_dennied.svg')
+
images = ('svg', 'png', 'gif', 'jpg', 'jpeg', 'xmp', 'ico')
videos = ('flv', '.mp4', '.mpa', '.mpe', '.mpeg', '.mpg')
-local = os.path.expanduser('~/.local')
-share = os.path.join(local, 'share')
-trash = os.path.join(share, 'Trash')
-PAPELERA = os.path.join(trash, 'files')
+
+PAPELERA = os.path.expanduser('~/.local/share/Trash/files')
def intentar_abrir(direccion):
@@ -42,18 +41,7 @@ def intentar_abrir(direccion):
def crear_papelera():
"""Crea los directorios de la papelera"""
- def crear(direccion):
- if not os.path.exists(direccion):
- os.mkdir(direccion)
-
- try:
- crear(local)
- crear(share)
- crear(trash)
- crear(PAPELERA)
-
- except:
- pass
+ os.makedirs(PAPELERA)
def get_tamanio(direccion):