Skip to content
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

paths with spaces not quoted in Task Scheduler task on Windows #253

Open
HertogArjan opened this issue Aug 30, 2023 · 1 comment
Open

paths with spaces not quoted in Task Scheduler task on Windows #253

HertogArjan opened this issue Aug 30, 2023 · 1 comment
Labels
bug Something isn't working windows Concerns only Windows OS

Comments

@HertogArjan
Copy link

I am running the latest version of resticprofile (0.23.0).

I was trying to figure out why the task in Task Scheduler generated by resticprofile kept failing. It turns out the paths to a config file and a log file in the command arguments of the task contained spaces and were not quoted. Adding the quotes manually fixed the issue.

This occurs both for the 'backup' and 'check' task.

The arguments generated for the backup task were:

--no-ansi --config C:\Users\<my username with spaces>\AppData\Roaming\resticprofile\profiles.yaml --name default --log C:\Users\<my username with spaces>\AppData\Roaming\resticprofile\default-backup.log backup

while they should have been:

--no-ansi --config "C:\Users\<my username with spaces>\AppData\Roaming\resticprofile\profiles.yaml" --name default --log "C:\Users\<my username with spaces>\AppData\Roaming\resticprofile\default-backup.log" backup

@creativeprojects
Copy link
Owner

You're right, the path is not escaped.

At the same time I also noticed it's not escaped when trying to elevate resticprofile to admin privileges.

@creativeprojects creativeprojects added the bug Something isn't working label Sep 30, 2023
@creativeprojects creativeprojects added the windows Concerns only Windows OS label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows Concerns only Windows OS
Projects
None yet
Development

No branches or pull requests

2 participants