fix windows compat and some bugs
This commit is contained in:
@@ -238,7 +238,6 @@ static error_t close_conf(void *state)
|
||||
ini_parse_end();
|
||||
settings_read_ini_end();
|
||||
|
||||
// force a full remount to have the changes be visible
|
||||
vfs_mngr_fs_remount(true);
|
||||
|
||||
return E_SUCCESS;
|
||||
|
||||
@@ -38,6 +38,8 @@
|
||||
// TRANSFER_NOT_STARTED || TRASNFER_FINISHED
|
||||
#define DISCONNECT_DELAY_MS 500
|
||||
|
||||
bool vfs_is_windows = false;
|
||||
|
||||
// Make sure none of the delays exceed the max time
|
||||
COMPILER_ASSERT(CONNECT_DELAY_MS < MAX_EVENT_TIME_MS);
|
||||
COMPILER_ASSERT(RECONNECT_DELAY_MS < MAX_EVENT_TIME_MS);
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern bool vfs_is_windows;
|
||||
|
||||
/* Callable from anywhere */
|
||||
|
||||
// Enable or disable the virtual filesystem
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "framework/settings.h"
|
||||
#include "platform.h"
|
||||
#include "vfs_manager.h"
|
||||
#include "str_utils.h"
|
||||
|
||||
const vfs_filename_t daplink_drive_name = "VIRTUALFS";
|
||||
|
||||
@@ -67,6 +68,13 @@ void vfs_user_file_change_handler(const vfs_filename_t filename,
|
||||
vfs_file_change_t change,
|
||||
vfs_file_t file, vfs_file_t new_file_data)
|
||||
{
|
||||
if (strstarts(filename, "SYSTEM~1")) {
|
||||
vfs_printf("ATENTION - we are dealing with windows! Careful or it will crash!");
|
||||
// TODO take precautions
|
||||
vfs_is_windows = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (VFS_FILE_CHANGED == change) {
|
||||
// Unused
|
||||
vfs_printf(">>> CHANGED %s", filename);
|
||||
|
||||
Reference in New Issue
Block a user