File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,8 @@ public function domove()
73
73
abort (404 );
74
74
}
75
75
76
+ $ old_path = $ old_file ->path ();
77
+
76
78
if ($ old_file ->hasThumb ()) {
77
79
$ new_file = $ this ->lfm ->setName ($ item )->thumb ()->dir ($ target );
78
80
if ($ is_directory ) {
@@ -85,9 +87,9 @@ public function domove()
85
87
$ new_file = $ this ->lfm ->setName ($ item )->dir ($ target );
86
88
$ this ->lfm ->setName ($ item )->move ($ new_file );
87
89
if ($ is_directory ) {
88
- event (new FolderWasMoving ($ old_file -> path () , $ new_file ->path ()));
90
+ event (new FolderWasMoving ($ old_path , $ new_file ->path ()));
89
91
} else {
90
- event (new FileWasMoving ($ old_file -> path () , $ new_file ->path ()));
92
+ event (new FileWasMoving ($ old_path , $ new_file ->path ()));
91
93
}
92
94
};
93
95
Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ public function getRename()
55
55
event (new ImageIsRenaming ($ old_file ->path (), $ new_file ));
56
56
}
57
57
58
+ $ old_path = $ old_file ->path ();
59
+
58
60
if ($ old_file ->hasThumb ()) {
59
61
$ this ->lfm ->setName ($ old_name )->thumb ()
60
62
->move ($ this ->lfm ->setName ($ new_name )->thumb ());
@@ -64,9 +66,9 @@ public function getRename()
64
66
->move ($ this ->lfm ->setName ($ new_name ));
65
67
66
68
if ($ is_directory ) {
67
- event (new FolderWasRenamed ($ old_file -> path () , $ new_file ));
69
+ event (new FolderWasRenamed ($ old_path , $ new_file ));
68
70
} else {
69
- event (new ImageWasRenamed ($ old_file -> path () , $ new_file ));
71
+ event (new ImageWasRenamed ($ old_path , $ new_file ));
70
72
}
71
73
72
74
return parent ::$ success_response ;
You can’t perform that action at this time.
0 commit comments