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

Weird behavior with folders having space character in their name #235

Open
ghost opened this issue Aug 10, 2018 · 6 comments
Open

Weird behavior with folders having space character in their name #235

ghost opened this issue Aug 10, 2018 · 6 comments
Labels

Comments

@ghost
Copy link

ghost commented Aug 10, 2018

Consider the following example

You have your dotfiles directory containing a folder named "A B". Then, after running rcup, everything is fine, except that a folder named "B" is created right where you started the rcup command. I think this is an error.

@ghost ghost changed the title Wierd behavior with folders having space character in their name Weird behavior with folders having space character in their name Aug 10, 2018
@jsatk
Copy link

jsatk commented Oct 23, 2018

I'm having the same issue.

@jsatk
Copy link

jsatk commented Oct 23, 2018

To add some clarity, I have two Dropbox's connected — a Personal and a Work. In ~ I have Dropbox (Personal) and Dropbox (Work). ~/Dropbox (Personal)/dotfiles is where I keep my dotfiles. I have a Makefile in there that symlinks everything. I was recently introduced to rcm and decided to try it. But I cannot figure out for the life of me how to set DOTFILES_DIRS in ~/.rcrc to ~/Dropbox (Personal)/dotfiles. To get around this I symlinked ~/Dropbox (Personal)/dotfiles to ~/.dotfiles — but this isn't my favorite solution.

@mike-burns mike-burns added the bug label Aug 28, 2020
@mike-burns
Copy link
Contributor

I believe it! Filenames with spaces and shell are a bad mix.

This is a great bug report, though -- it can clearly and simply be reproduced. I'll see if I can track down why such directories are breaking, and if it can be fixed.

@ubmarco
Copy link

ubmarco commented Oct 15, 2021

I'm having an issue with vscode open source release config. rcm thinks the config file is unlinked but correctly sets it up. Whenever I run rcup, I get this:

replacing identical but unlinked /home/marco/.config/Code - OSS/User/settings.json
removed '/home/marco/.config/Code - OSS/User/settings.json'
'/home/marco/.dotfiles/tag-vscode/config/Code - OSS/User/settings.json' -> '/home/marco/.config/Code - OSS/User/settings.json'

@vergenzt
Copy link

vergenzt commented Jul 12, 2022

I'm having this same issue because I'm trying to manage MailMate custom keybinding configs in my rcm dotfiles repo. I want it to symlink the Library/Application Support/MailMate/Resources/KeyBindings directory, and I escaped the space when listing it in ~/.rcrc's SYMLINK_DIRS variable, but the path still always symlinks the individual file inside. 😕

@jest
Copy link

jest commented Sep 9, 2023

I have the same problem. Reading through the code I see that only one line needs to be changed to fix this problem:

rcm/bin/rcup.in

Lines 128 to 138 in ef34b0b

is_linked() {
local src="$1"
local dest="$2"
if [ -h "$dest" ]; then
local link_dest=$(readlink $dest)
[ "$link_dest" = "$src" ]
else
return 1
fi
}

in line 133 the $dest should be quoted, i.e.

    local link_dest=$(readlink "$dest")

Patching this locally in /usr/bin/rcup "works for me".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants