File tree Expand file tree Collapse file tree 4 files changed +17
-0
lines changed Expand file tree Collapse file tree 4 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,10 @@ function RecordingContext:_promote_v2_to_v3()
115115end
116116
117117function RecordingContext :get_recording_image_path (index )
118+ if not app .fs .isDirectory (self .record_directory_path ) then
119+ app .fs .makeDirectory (self .record_directory_path )
120+ end
121+
118122 return app .fs .joinPath (self .record_directory_path , self .sprite_file_name .. " _" .. index .. " .png" )
119123end
120124
@@ -210,6 +214,7 @@ function Snapshot:save()
210214 local image = self :_get_current_image ()
211215 local index = self .context :get_recording_index ()
212216 local path = self :get_recording_image_path (index )
217+
213218 image :saveAs {
214219 filename = path ,
215220 palette = self .sprite .palettes [1 ]
Original file line number Diff line number Diff line change @@ -113,6 +113,10 @@ function RecordingContext:_promote_v2_to_v3()
113113end
114114
115115function RecordingContext :get_recording_image_path (index )
116+ if not app .fs .isDirectory (self .record_directory_path ) then
117+ app .fs .makeDirectory (self .record_directory_path )
118+ end
119+
116120 return app .fs .joinPath (self .record_directory_path , self .sprite_file_name .. " _" .. index .. " .png" )
117121end
118122
Original file line number Diff line number Diff line change @@ -113,6 +113,10 @@ function RecordingContext:_promote_v2_to_v3()
113113end
114114
115115function RecordingContext :get_recording_image_path (index )
116+ if not app .fs .isDirectory (self .record_directory_path ) then
117+ app .fs .makeDirectory (self .record_directory_path )
118+ end
119+
116120 return app .fs .joinPath (self .record_directory_path , self .sprite_file_name .. " _" .. index .. " .png" )
117121end
118122
Original file line number Diff line number Diff line change @@ -113,6 +113,10 @@ function RecordingContext:_promote_v2_to_v3()
113113end
114114
115115function RecordingContext :get_recording_image_path (index )
116+ if not app .fs .isDirectory (self .record_directory_path ) then
117+ app .fs .makeDirectory (self .record_directory_path )
118+ end
119+
116120 return app .fs .joinPath (self .record_directory_path , self .sprite_file_name .. " _" .. index .. " .png" )
117121end
118122
You can’t perform that action at this time.
0 commit comments