Skip to content

Commit e3d227d

Browse files
committed
[StorageManager]
* limit custom mount point
1 parent 9f00305 commit e3d227d

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎lib/python/Screens/DeviceManager.py‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,12 @@ def keySaveCallback(data, retVal, extraArgs):
10791079
self.deviceMounts = []
10801080

10811081
for index, device in enumerate(self.devices):
1082-
mountPoint = self.mountPoints[index].value or f"/media/{self.customMountPoints[index].value}"
1082+
if self.mountPoints[index].value:
1083+
mountPoint = self.mountPoints[index].value
1084+
else:
1085+
mountPoint = self.customMountPoints[index].value
1086+
mountPoint = "".join(x for x in mountPoint if x.isalnum() or x in "_-")
1087+
mountPoint = f"/media/{mountPoint}"
10831088
fileSystem = self.fileSystems[index].value
10841089
options = self.options[index].value
10851090
# device , fstabmountpoint, isMounted , deviceUuid, name, choiceList

0 commit comments

Comments
 (0)