File tree Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -1145,17 +1145,7 @@ impl Document {
11451145 }
11461146 }
11471147 }
1148- let write_path = tokio:: fs:: read_link ( & path)
1149- . await
1150- . ok ( )
1151- . and_then ( |p| {
1152- if p. is_relative ( ) {
1153- path. parent ( ) . map ( |parent| parent. join ( p) )
1154- } else {
1155- Some ( p)
1156- }
1157- } )
1158- . unwrap_or_else ( || path. clone ( ) ) ;
1148+ let write_path = path. clone ( ) ;
11591149
11601150 if readonly ( & write_path) {
11611151 bail ! ( std:: io:: Error :: new(
@@ -1200,7 +1190,7 @@ impl Document {
12001190 open_opt. mode ( mode) ;
12011191 }
12021192
1203- let mut file = open_opt. open ( & path) . await ?;
1193+ let file = open_opt. open ( & path) . await ?;
12041194
12051195 #[ cfg( unix) ]
12061196 {
@@ -1221,7 +1211,7 @@ impl Document {
12211211 use std:: fs:: { File , FileTimes } ;
12221212 use std:: os:: macos:: fs:: FileTimesExt ;
12231213
1224- let file = file. try_clone ( ) ?. into_std ( ) ;
1214+ let file = file. try_clone ( ) . await ?. into_std ( ) ;
12251215 let times = FileTimes :: new ( ) . set_created ( meta. created ( ) ?) ;
12261216 file. set_times ( times) ?;
12271217 }
@@ -1252,6 +1242,8 @@ impl Document {
12521242 Ok ( ( ) )
12531243 }
12541244 . await ;
1245+ write_result. unwrap ( ) ;
1246+ todo ! ( ) ;
12551247
12561248 let save_time = match fs:: metadata ( & write_path) . await {
12571249 Ok ( metadata) => metadata. modified ( ) . map_or ( SystemTime :: now ( ) , |mtime| mtime) ,
You can’t perform that action at this time.
0 commit comments