diff --git a/.github/workflows/workflow_ci.yml b/.github/workflows/workflow_ci.yml index f62844bb..6a3b014f 100644 --- a/.github/workflows/workflow_ci.yml +++ b/.github/workflows/workflow_ci.yml @@ -52,7 +52,7 @@ jobs: if: ${{ needs.check_src.outputs.any_changed == 'true' || needs.check_workflow.outputs.any_changed == 'true' }} steps: - name: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: revision @@ -68,7 +68,7 @@ jobs: run: dotnet publish src/compute.sln -c Release - name: artifacts if: github.ref == 'refs/heads/8.x' - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: path: src/dist name: rhino.compute \ No newline at end of file diff --git a/src/hops/HopsComponent.cs b/src/hops/HopsComponent.cs index 3d9e797a..25ef871c 100644 --- a/src/hops/HopsComponent.cs +++ b/src/hops/HopsComponent.cs @@ -367,15 +367,22 @@ public override bool Read(GH_IReader reader) { if (!File.Exists(path)) { - // See if the file is in the same directoy as this definition. If it - // is then use that file. NOTE: This will change the saved path for - // for this component when we save the GH definition again. That may or - // may not be a problem; I'm not sure yet. - string parentDirectory = Path.GetDirectoryName(reader.ArchiveLocation); - string remoteFileName = Path.GetFileName(path); - string filePath = Path.Combine(parentDirectory, remoteFileName); - if (File.Exists(filePath)) - path = filePath; + if(path.StartsWith("http", StringComparison.OrdinalIgnoreCase)) + { + RemoteDefinitionLocation = path; + } + else + { + // See if the file is in the same directory as this definition. If it + // is then use that file. NOTE: This will change the saved path for + // for this component when we save the GH definition again. That may or + // may not be a problem; I'm not sure yet. + string parentDirectory = Path.GetDirectoryName(reader.ArchiveLocation); + string remoteFileName = Path.GetFileName(path); + string filePath = Path.Combine(parentDirectory, remoteFileName); + if (File.Exists(filePath)) + path = filePath; + } } } RemoteDefinitionLocation = path;