Skip to content

Commit

Permalink
Fix usbdisk filename
Browse files Browse the repository at this point in the history
by Willy-JL
  • Loading branch information
xMasterX committed Feb 22, 2024
1 parent b29a589 commit b0a7412
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion applications/system/js_app/modules/js_usbdisk/js_usbdisk.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "../../js_modules.h"
#include <furi_hal_usb.h>
#include <toolbox/path.h>
#include "mass_storage_usb.h"

#define TAG "JsUsbdisk"
Expand Down Expand Up @@ -128,7 +129,10 @@ static void js_usbdisk_start(struct mjs* mjs) {

furi_hal_usb_unlock();
usbdisk->was_ejected = false;
usbdisk->usb = mass_storage_usb_start(usbdisk->path, fn);
FuriString* name = furi_string_alloc();
path_extract_filename_no_ext(usbdisk->path, name);
usbdisk->usb = mass_storage_usb_start(furi_string_get_cstr(name), fn);
furi_string_free(name);

mjs_return(mjs, MJS_UNDEFINED);
}
Expand Down

0 comments on commit b0a7412

Please sign in to comment.