diff --git a/cinera/cinera.c b/cinera/cinera.c index 7748f74..b65c222 100644 --- a/cinera/cinera.c +++ b/cinera/cinera.c @@ -17,7 +17,7 @@ typedef struct version CINERA_APP_VERSION = { .Major = 0, .Minor = 6, - .Patch = 3 + .Patch = 4 }; #include // NOTE(matt): varargs @@ -1270,7 +1270,6 @@ int MakeDir(char *Path) { // TODO(matt): Correctly check for permissions - int i = StringLength(Path); int Ancestors = 0; while(mkdir(Path, 00755) == -1) { @@ -1281,6 +1280,7 @@ MakeDir(char *Path) if(StripComponentFromPath(Path) == RC_ERROR_DIRECTORY) { return RC_ERROR_DIRECTORY; } ++Ancestors; } + int i = StringLength(Path); while(Ancestors > 0) { while(Path[i] != '\0') @@ -2108,7 +2108,7 @@ PushHMMLWatchHandle(void) { FitWatchHandle(); CopyString(WatchHandles.Handle[WatchHandles.Count].Path, sizeof(WatchHandles.Handle[0].Path), Config.ProjectDir); - WatchHandles.Handle[WatchHandles.Count].Descriptor = inotify_add_watch(inotifyInstance, Config.ProjectDir, IN_CLOSE_WRITE | IN_DELETE); + WatchHandles.Handle[WatchHandles.Count].Descriptor = inotify_add_watch(inotifyInstance, Config.ProjectDir, IN_MOVED_TO | IN_CLOSE_WRITE | IN_DELETE); WatchHandles.Handle[WatchHandles.Count].Type = WT_HMML; ++WatchHandles.Count; } @@ -7991,7 +7991,7 @@ MonitorFilesystem(buffers *CollationBuffers, template *SearchTemplate, template { Deleted |= (DeleteEntry(&Neighbourhood, Event->name) == RC_SUCCESS); } - else if(Event->mask & IN_CLOSE_WRITE) + else if(Event->mask & IN_CLOSE_WRITE || Event->mask & IN_MOVED_TO) { Inserted |= (InsertEntry(&Neighbourhood, CollationBuffers, PlayerTemplate, BespokeTemplate, Event->name, 0) == RC_SUCCESS); } @@ -9064,7 +9064,7 @@ main(int ArgC, char **Args) goto RIP; } - printf("\n┌╼ Monitoring Annotations Directory for %snew%s, %sedited%s and %sdeleted%s .hmml files ╾┐\n", + printf("\n┌╼ Monitoring file system for %snew%s, %sedited%s and %sdeleted%s .hmml and asset files ╾┐\n", ColourStrings[EditTypes[EDIT_ADDITION].Colour], ColourStrings[CS_END], ColourStrings[EditTypes[EDIT_REINSERTION].Colour], ColourStrings[CS_END], ColourStrings[EditTypes[EDIT_DELETION].Colour], ColourStrings[CS_END]);