this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

added check for root to exit surf (#2542)

authored by

Matthew and committed by
GitHub
8667badc 8c769f81

+9 -1
+6
src/studio/fs.c
··· 112 112 return fs->work[0] == '\0'; 113 113 } 114 114 115 + bool tic_fs_isroot(tic_fs* fs) 116 + { 117 + return isRoot(fs); 118 + } 119 + 115 120 static bool isPublicRoot(tic_fs* fs) 116 121 { 117 122 return strcmp(fs->work, PublicDir) == 0; 118 123 } 124 + 119 125 120 126 static bool isPublic(tic_fs* fs) 121 127 {
+1
src/studio/fs.h
··· 50 50 bool tic_fs_exists (tic_fs* fs, const char* name); 51 51 void tic_fs_openfolder (tic_fs* fs); 52 52 bool tic_fs_isdir (tic_fs* fs, const char* dir); 53 + bool tic_fs_isroot (tic_fs* fs); 53 54 bool tic_fs_ispubdir (tic_fs* fs); 54 55 void tic_fs_changedir (tic_fs* fs, const char* dir); 55 56 void tic_fs_dir (tic_fs* fs, char* out);
+2 -1
src/studio/screens/surf.c
··· 693 693 if(tic_api_btnp(tic, B, -1, -1) 694 694 || tic_api_keyp(tic, tic_key_backspace, -1, -1)) 695 695 { 696 - goBackDir(surf); 696 + if(tic_fs_isroot(surf->fs)) setStudioMode(surf->studio, TIC_CONSOLE_MODE); 697 + else goBackDir(surf); 697 698 } 698 699 699 700 #ifdef CAN_OPEN_URL