Skip to content

Commit d3a667b

Browse files
author
Kerby Geffrard
authored
Fixes rvlink/rvpush handler when installed outside of C:\ (AcademySoftwareFoundation#323)
<!-- Thanks for your contribution! Please read this comment in its entirety. It's quite important. When a contributor merges the pull request, the title and the description will be used to build the merge commit! ### Pull Request TITLE It should be in the following format: [ 12345: Summary of the changes made ] Where 12345 is the corresponding Github Issue OR [ Summary of the changes made ] If it's solving something trivial, like fixing a typo. --> ### Linked issues <!-- Link the Issue(s) this Pull Request is related to. Each PR should link to at least one issue, in the form: Use one line for each Issue. This allows auto-closing the related issue when the fix is merged. Fixes #12345 Fixes #54345 --> N/A ### Summarize your change. Fixes the .bat files that install the rvlink/rvpush URL scheme handlers by adding an extra \d to the cd calls so we change drive if required with the change directory call (it's a Windows thing...) ### Describe the reason for the change. @savoiei reported that if OpenRV is installed on another drive than the OS drive (C:\ in most cases), the script fails with `Executable file C:\Windows\bin\rv.exe does not exist. Exiting script.` The reason behind that is that when cmd.exe starts from explorer.exe, it's from the directory that contains cmd.exe, and then we try to cd to the location of the script being executed, to locate rv.exe relative to the script. Adding \d tells the cd call to change both the path and the drive, because they are two separate concepts on Windows. ### Describe what you have tested and on which operating system. Tested on Windows. ### Add a list of changes, and note any that might need special attention during the review. N/A ### If possible, provide screenshots. N/A Signed-off-by: Kerby Geffrard <kerby.geffrard@autodesk.com>
1 parent 0200db0 commit d3a667b

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

packages/rv/openwith.reg.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if %errorLevel% == 0 (
1010
exit /b
1111
)
1212

13-
cd %~dp0
13+
cd /d %~dp0
1414
pushd ..
1515

1616
REM Define the path to the executable

packages/rv/openwith_rvpush_merge.reg.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if %errorLevel% == 0 (
1010
exit /b
1111
)
1212

13-
cd %~dp0
13+
cd /d %~dp0
1414
pushd ..
1515

1616
REM Define the path to the executable

packages/rv/openwith_rvpush_set.reg.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if %errorLevel% == 0 (
1010
exit /b
1111
)
1212

13-
cd %~dp0
13+
cd /d %~dp0
1414
pushd ..
1515

1616
REM Define the path to the executable

packages/rv/rvlink.reg.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if %errorLevel% == 0 (
1010
exit /b exit /b
1111
)
1212

13-
cd %~dp0
13+
cd /d %~dp0
1414
pushd ..
1515

1616
REM Define the path to the executable

packages/rv/rvlink_rvpush.reg.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if %errorLevel% == 0 (
1010
exit /b
1111
)
1212

13-
cd %~dp0
13+
cd /d %~dp0
1414
pushd ..
1515

1616
REM Define the path to the executable

0 commit comments

Comments
 (0)