File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -450,8 +450,10 @@ impl DummyArkFrontend {
450450 let mut file = NamedTempFile :: new ( ) . unwrap ( ) ;
451451 write ! ( file, "{code}" ) . unwrap ( ) ;
452452
453+ // Use forward slashes for R compatibility on Windows (backslashes would be
454+ // interpreted as escape sequences in R strings)
455+ let path = file. path ( ) . to_string_lossy ( ) . replace ( '\\' , "/" ) ;
453456 let url = ExtUrl :: from_file_path ( file. path ( ) ) . unwrap ( ) ;
454- let path = url. path ( ) . to_string ( ) ;
455457 let uri = url. to_string ( ) ;
456458 let filename = file
457459 . path ( )
@@ -666,8 +668,10 @@ impl SourceFile {
666668 let mut file = NamedTempFile :: new ( ) . unwrap ( ) ;
667669 write ! ( file, "{code}" ) . unwrap ( ) ;
668670
671+ // Use forward slashes for R compatibility on Windows (backslashes would be
672+ // interpreted as escape sequences in R strings)
673+ let path = file. path ( ) . to_string_lossy ( ) . replace ( '\\' , "/" ) ;
669674 let url = ExtUrl :: from_file_path ( file. path ( ) ) . unwrap ( ) ;
670- let path = url. path ( ) . to_string ( ) ;
671675 let uri = url. to_string ( ) ;
672676
673677 // Extract file name
You can’t perform that action at this time.
0 commit comments