File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed
Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change 1111use OC \Files \Mount \MoveableMount ;
1212use OC \Files \Storage \Storage ;
1313use OC \Files \Storage \Wrapper \Quota ;
14+ use OC \Files \Utils \PathHelper ;
1415use OC \Share \Share ;
1516use OC \User \LazyUser ;
1617use OC \User \Manager as UserManager ;
@@ -92,13 +93,7 @@ public function getAbsolutePath($path = '/'): ?string {
9293 return null ;
9394 }
9495 $ this ->assertPathLength ($ path );
95- if ($ path === '' ) {
96- $ path = '/ ' ;
97- }
98- if ($ path [0 ] !== '/ ' ) {
99- $ path = '/ ' . $ path ;
100- }
101- return $ this ->fakeRoot . $ path ;
96+ return PathHelper::normalizePath ($ this ->fakeRoot . '/ ' . $ path );
10297 }
10398
10499 /**
Original file line number Diff line number Diff line change @@ -917,11 +917,11 @@ public function testPartFileInfo(): void {
917917
918918 public static function absolutePathProvider (): array {
919919 return [
920- ['/files/ ' , '' ],
920+ ['/files ' , '' ],
921921 ['/files/0 ' , '0 ' ],
922922 ['/files/false ' , 'false ' ],
923923 ['/files/true ' , 'true ' ],
924- ['/files/ ' , '/ ' ],
924+ ['/files ' , '/ ' ],
925925 ['/files/test ' , 'test ' ],
926926 ['/files/test ' , '/test ' ],
927927 ];
You can’t perform that action at this time.
0 commit comments