File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
app/src/main/java/com/github/libretube/ui/dialogs Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ class DownloadDialog : DialogFragment() {
149149 return @onDownloadConfirm
150150 }
151151
152- if (fileName.length > MAX_FILE_NAME_LENGTH - 20 ) { // reserve 20 chars for quality and extension
152+ if (fileName.toByteArray().size > MAX_FILE_NAME_BYTES - 32 ) { // reserve 32 bytes for quality and extension
153153 Toast .makeText(context, R .string.filename_too_long, Toast .LENGTH_SHORT ).show()
154154 return @onDownloadConfirm
155155 }
@@ -265,7 +265,7 @@ class DownloadDialog : DialogFragment() {
265265 /* *
266266 * Max file name length at Android systems
267267 */
268- private const val MAX_FILE_NAME_LENGTH = 255
268+ private const val MAX_FILE_NAME_BYTES = 255
269269
270270 private const val VIDEO_DOWNLOAD_QUALITY = " video_download_quality"
271271 private const val VIDEO_DOWNLOAD_FORMAT = " video_download_format"
You can’t perform that action at this time.
0 commit comments