Skip to content

Commit 0930e61

Browse files
authored
Merge pull request #609 from anusii/jess/608_chk_url
Jess/608 chk url
2 parents 368cf7d + bcf5f16 commit 0930e61

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

lib/src/solid/utils/get_url_helper.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2626
// SOFTWARE.
2727
///
28-
/// Authors: Anushka Vidanage, Dawei Chen
28+
/// Authors: Anushka Vidanage, Dawei Chen, Jess Moore
2929
3030
library;
3131

@@ -110,8 +110,10 @@ Future<String> filenameToResourceUrl({
110110
isFileUrl = true;
111111
}
112112

113-
// If not already a url, get url
114-
if (!isExternalRes && !isFileUrl) {
113+
// If resource name lacks a url scheme, is not an
114+
// externally owned resource and is not already
115+
// declared as a url, then form url from resource name
116+
if (!Uri.parse(fileName).hasScheme && !isExternalRes && !isFileUrl) {
115117
// Get the file path
116118
// Ensure path uses correct path separators and
117119
// has app data dir prepended.

0 commit comments

Comments
 (0)