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

Cmder looking for user-aliases in wrong path #1039

Closed
jrappen opened this issue Jul 14, 2016 · 9 comments
Closed

Cmder looking for user-aliases in wrong path #1039

jrappen opened this issue Jul 14, 2016 · 9 comments

Comments

@jrappen
Copy link
Contributor

jrappen commented Jul 14, 2016

After updating to v1.3.0:

Creating intial user-aliases store in "C:\Users\user\Downloads\cmder\config\user-aliases.cmd"...
C:\Users\user\Downloads\cmder\C:\Users\user\Downloads\cmder\config\user-aliases.cmd
Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch.
        0 Datei(en) kopiert.
Das System kann die angegebene Datei nicht finden.

Roughly translated: Wrong syntax for file name, folder name or drive name. / 0 files copied. / System was unable to find the desired file.


  • File does exist.
  • File is not being overwritten by cmder upon startup.
@jrappen
Copy link
Contributor Author

jrappen commented Jul 14, 2016

Renaming user-aliases.cmd to aliases makes cmder find and rename the file to user-aliases.cmd correctly. Then the error above reappears.

@Stanzilla
Copy link
Member

Did you maybe delete or not copy in https://github.com/cmderdev/cmder/blob/master/vendor/user-aliases.cmd.example?

@jrappen
Copy link
Contributor Author

jrappen commented Jul 14, 2016

Data is in %CMDER_ROOT%/config/user-aliases.cmd.

Had deleted the example file, yes. Re-added it. Output now is:

Creating intial user-aliases store in "C:\Users\user\Downloads\cmder\config\user-aliases.cmd"...
C:\Users\user\Downloads\cmder\C:\Users\user\Downloads\cmder\config\user-aliases.cmd
Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch.
        0 Datei(en) kopiert.
        1 Datei(en) kopiert.

Aliases still don't work.

@Stanzilla
Copy link
Member

Yeah you need to stop messing with the file structure on your own, I just tested it on a fresh folder and it works fine.

@jrappen
Copy link
Contributor Author

jrappen commented Jul 14, 2016

Ok, other question. Where do I put my data from the old ../config/aliases then? Putting it in ../config/user-aliases.cmd didn't work.

@jrappen
Copy link
Contributor Author

jrappen commented Jul 14, 2016

After readding the example file, closing and reopening cmder it now works as expected. Why is cmder messed up when removing the example file? I'm probably not the only one who'd do that.

@jrappen jrappen closed this as completed Jul 14, 2016
@Stanzilla
Copy link
Member

It uses it to generate the content of the real file, and yes I agree that the method is sub-optimal but better than what we had before. Maybe @daxgames will look into it again and maybe have the file generated without using a dummy file.

@daxgames
Copy link
Member

@jrappen I know this is closed but want to make sure things are working as designed.

If you had an existing aliases file in %CMDER_ROOT%\config\aliases and copied the 1.3 release files from an extracted archive into %COMDER_ROOT% then the init.bat is supposed to update your existing aliases file to the new format. Did you copy the new release into an existing %CMDER_ROOT% folder or start with a fresh new folder with 1.3?

If %CMDER_ROOT%\config\aliases does not exist when launching 1.3 the first time, from a new folder, a new default %CMDER_ROOT%\config\user-aliases.cmd is created from the seed file.

@jrappen
Copy link
Contributor Author

jrappen commented Jul 15, 2016

@daxgames I had downloaded v1.3.0 as zip and copied my old stuff into the then-extracted cmder root folder. Everything works fine, the renaming and creation if not present. My mistakes was that I had deleted %CMDER_ROOT%\vendor\user-aliases.cmd.example, which left cmder still able to create new and/or rename old aliases file in %CMDER_ROOT%\config\ however it wouldn't pick up data from there. Repasting the error from my first post in this thread:

Creating intial user-aliases store in "C:\Users\user\Downloads\cmder\config\user-aliases.cmd"...
C:\Users\user\Downloads\cmder\C:\Users\user\Downloads\cmder\config\user-aliases.cmd
Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch.
        0 Datei(en) kopiert.
Das System kann die angegebene Datei nicht finden.

It seems like cmder was looking in %CMDER_ROOT%\%CMDER_ROOT%\config\user-aliases.cmd, so maybe there's a duplicate while setting the path in there somewhere?

/cc @Stanzilla

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

No branches or pull requests

3 participants