refs #1594 fix two bugs

pull/1/head
Natalia Serrano 2025-02-20 14:03:12 +01:00
parent 45cfe25222
commit 000ea29e70
1 changed files with 3 additions and 2 deletions

View File

@ -333,15 +333,16 @@ def ogMountCache():
#@warning Salidas de errores no determinada
#*/ ##
def ogUnmountCache():
cachepart = ogFindCache().split()
cachepart = ogFindCache()
if cachepart is None:
SystemLib.ogRaiseError ([], ogGlobals.OG_ERR_PARTITION, ogGlobals.lang.MSG_NOCACHE)
return
cachepart = cachepart.split()
if not FileSystemLib.ogIsMounted (cachepart[0], cachepart[1]): return True
FileSystemLib.ogUnmountFs (cachepart[0], cachepart[1])
# Eliminar el enlace simbólico de /mnt/ParticiónCache.
dev = DiskLib.ogDiskToDev (cachepart[0], cachepart[1])
dev = dev.replace ('dev', 'mnt')
os.remove (dev)
if os.path.exists (dev): os.remove (dev)