X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/64bad81e89129d6f0c7276395509330ba952a887..21ad640445f0812c5fa954015a3389e4824dc5e1:/lib/python/Components/Harddisk.py diff --git a/lib/python/Components/Harddisk.py b/lib/python/Components/Harddisk.py index 0fc17d69..37e957e4 100644 --- a/lib/python/Components/Harddisk.py +++ b/lib/python/Components/Harddisk.py @@ -1,5 +1,7 @@ import os +from Tools.Directories import * + def tryOpen(filename): try: procFile = open(filename) @@ -103,7 +105,8 @@ class Harddisk: def unmount(self): cmd = "/bin/umount " + self.devidex + "part*" - os.system(cmd) + res = os.system(cmd) + return (res >> 8) def createPartition(self): cmd = "/sbin/sfdisk -f " + self.devidex + "disc" @@ -123,9 +126,11 @@ class Harddisk: return (res >> 8) def createMovieFolder(self): - res = os.system("mkdir /hdd/movies") + res = os.system("mkdir " + resolveFilename(SCOPE_HDD)) return (res >> 8) + errorList = [ _("Everything is fine"), _("Creating partition failed"), _("Mkfs failed"), _("Mount failed"), _("Create movie folder failed"), _("Unmount failed")] + def initialize(self): self.unmount()