SnapRAID Plugin Rules Bug?

  • When creating a rule, if a directory is selected, the resulting rule should end with a forward slash (/).


    If a file is selected, the resulting rule should end with the last character in the filename.


    Bug?


    Rules created for directories do not end with a forward slash, so they are effectively ignored.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 6.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 16GB ECC RAM.

    Edited once, last by gderf ().

    • Official Post

    The root folder browser component just returns a path. How do you propose the code figures out if the last element of that path is a directory or file? Directories can have . in them and files don't always have extensions. And since the code is running in javascript in the browser, it can't check the server's filesystem for the answer.


    And I wouldn't call this a bug. I really just intended the folder browser to be helpful creating the rule not putting any logic into it. That is why it is an editable text field.

    omv 6.2.0-1 Shaitan | 64 bit | 6.1 proxmox kernel

    plugins :: omvextrasorg 6.1.1 | kvm 6.2.8 | compose 6.6.1 | cputemp 6.1.3 | mergerfs 6.3.5 | zfs 6.0.12


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Ok, but my observation was that in past versions of OMV it worked as expected. But I could be wrong too. Until yesterday I haven't created any new rules in years.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 6.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 16GB ECC RAM.

    • Official Post

    Ok, but my observation was that in past versions of OMV it worked as expected. But I could be wrong too. Until yesterday I haven't created any new rules in years.

    I fired up both versions. I did screw up when I "fixed" the omv 5.x version of snapraid. I allowed the full OS instead of just the folders for the selected volume. But neither one allows you to select files. Not sure if I should change it back to the volume browser instead of full root but either way. I guess I can make sure the trailing slash is on there.

    omv 6.2.0-1 Shaitan | 64 bit | 6.1 proxmox kernel

    plugins :: omvextrasorg 6.1.1 | kvm 6.2.8 | compose 6.6.1 | cputemp 6.1.3 | mergerfs 6.3.5 | zfs 6.0.12


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • If I read you correctly, I noticed this too. When I create a rule and select the drive, and then select the directory, the resulting rule contains the fully qualified path to the folder. SnapRaid seems to ignore this rule. I have to manually edit it to be just the directory name but not including the drive.

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 6.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 16GB ECC RAM.

  • @ryecoaaron


    While you are at it, can anything be done to improve the contrast in the Config Tab?


    Thanks

    --
    Google is your friend and Bob's your uncle!


    OMV AMD64 6.x on headless Chenbro NR12000 1U 1x 8m Quad Core E3-1220 3.1GHz 16GB ECC RAM.

    • Official Post

    5.0.5 is in the repo. The rules should behave just like OMV 4.x and the contrast is fixed.

    omv 6.2.0-1 Shaitan | 64 bit | 6.1 proxmox kernel

    plugins :: omvextrasorg 6.1.1 | kvm 6.2.8 | compose 6.6.1 | cputemp 6.1.3 | mergerfs 6.3.5 | zfs 6.0.12


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!