-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cya does not handle directory names with spaces #12
Comments
Have you tried putting a back slash? /home/dsanroma/directory\ with\ spaces/ |
Yes I did... no dice... ;( |
Okay. Well that needs to be patched and honestly has the highest priority out of all these issues. |
Makes sense, of course... Bugs first, features later... ;) I will keep on testing different things and scenarios... |
All you need to do is try \\ /home/dsanroma/directory\\ with\\ spaces/ |
The double slashes got edited by github (makes sense) so in case you only check email first and not my revised post it is backslash backslash together or double backslashes. That will allow a slash to occur and spaces to work. So /directory(backslashbackslashspace)with(backslashbackslashspace)spaces/ |
Tested and it works!!!! Since it is not all that intuitive to have to "escape twice", maybe the syntax could be explained / specified in the What do you think ? |
Yeah I already added it to the configfile information in 2.3.1+ dev/2.4 |
I added the question label since there is nothing to change code wise. Also using labels to keep track of what has been done. You have been emailed a dev copy 2.3.1 for the three enhancements. |
Checks that "double-back-slash explanation" is present in:
However, there is an error in this example provided in the
should be
|
Good catch and a typo. Fixed in 2.3.2. |
The initial tests showed that the command However, when I tried to run the backup with a
|
Confirmed. This will take time to address as spaces fixed in one area error out others. The script wasn't designed for spaces and even though function calls are used there are multiple lines that need addressing. As stated I get it working in one area and it fails in another. I am still working out the most efficient way to code that will work in all areas with out having to rewrite whole blocks of code. It isn't proving easy. Thus far all attempts have failed even changing out spaces for things like []. It is beginning to look like this feature may have to wait some. It is turning into a major update. We shall see. |
Okay this is now working in v2.3.5+ with save and keep commands. The mydata command is still in processing and will add more logic later. This hasn't been the most straightforward alternations. I'll let you know when I get more time but for a bit other projects have higher priority. I still need to recode the exclude with spaces too. I am changing the format to [] for spaces and eliminating \ at least in the quotes. We shall see about the profile names. It is much easier than having to deal with multiple slashes. At least I know what to do but need more time. |
This appears to be working 2.3.5+ but needs more testing. |
Tested on 2.3.5 and it fails for me.
|
I am not surprised. The reason is because CYA was originally only creating one directory deep. Since you have specified three /home/dsanroma/directory with spaces/ this is failing as /home/ and then inside that /dsanroma/ need to be created first. So of course /directory with spaces/ fails as the parents are missing. No problem. I'll just add the -p flag to mkdir shortly as that is simple to do. |
I did briefly look at this however there is a slight issue. The save and keep commands are really more for system directories. When directories are created they get the owner of root. Which is correct for system directories. I could run mkdir differently but that wouldn't work as desired. You should stick user files into the mydata command so that they will correctly get the right owner. This is one of the reasons I wrote the mydata command. So one can create the destination directory with the necessary ownership. Then when restoring the correct information will be used. I could create a check original ownership and if not root change directory to that user but that seems unnecessary when one can use the mydata command. |
Ok... it makes sense... I will test it out in a similar way but with system folder with spaces and multiple levels down owned by root. I will also make deeper tests with |
Did you fix this one? Some possible fixes w/ single quotes should work:
|
The following setting makes
cya
fail.Similar things happen with
MYDATA_xxxx
settings with spaces in them.Maybe the string could be broken up with
regex
instead of just white spaces.just a though
The text was updated successfully, but these errors were encountered: