dietpi-drive_manager - Ignoring forward slashes (/)

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
AndrewB
Posts: 2
Joined: Wed Nov 08, 2017 11:31 pm

dietpi-drive_manager - Ignoring forward slashes (/)

Post by AndrewB »

I was trying to mount a network drive to a custom location within the /mnt folder (/mnt/NAS/GoFlex to be exact), but when I entered NAS/GoFlex as the folder name, it completely ignored the forward slash and named the folder NASGoflex instead.

I did create the folder structure manually beforehand too.

Using DietPi v6.14 Pine A64 (aarch64)
User avatar
MichaIng
Site Admin
Posts: 2262
Joined: Sat Nov 18, 2017 6:21 pm

Re: dietpi-drive_manager - Ignoring forward slashes (/)

Post by MichaIng »

@AndrewB
Thanks for your report. Just to verify: It was a samba drive, right?

Backslashes are currently removed by design, but from my point of view there is no reason to not allow sub directories inside /mnt.

I will fix it for v6.15, if Fourdee has no special reason for it.
AndrewB
Posts: 2
Joined: Wed Nov 08, 2017 11:31 pm

Re: dietpi-drive_manager - Ignoring forward slashes (/)

Post by AndrewB »

Yes, it was a Samba drive
User avatar
MichaIng
Site Admin
Posts: 2262
Joined: Sat Nov 18, 2017 6:21 pm

Re: dietpi-drive_manager - Ignoring forward slashes (/)

Post by MichaIng »

PR up with above fix/solution + some other small improvements: https://github.com/Fourdee/DietPi/pull/2062

As a fast fix, also to test, you need to replace the following line

Code: Select all

samba_fp_mount_target="/mnt/$(sed 's/\///g' <<< $G_WHIP_RETURNED_VALUE | sed 's/[[:space:]]/_/g')"
with

Code: Select all

samba_fp_mount_target="/mnt/${G_WHIP_RETURNED_VALUE//[[:space:]]/_}"
inside /DietPi/dietpi/dietpi-drive_manager.
Post Reply