Giter Site home page Giter Site logo

auroraffxivplugin's Introduction

Projects

A plugin for XIVLauncher that displays live data for targeted mobs in Final Fantasy XIV's Deep Dungeons. Data is web loaded into the plugin and is curated from multiple sources, the most prominent of which are my own testing, Maygi's resources for Palace of the Dead and Heaven-on-High, Compendium, Angelus' Mimic Appreciation, and what other resources I stumble over.

Contributions

  • CExporter
  • GitHub Actions validations
  • Best Exp calculator
  • Leveling calculator

Languages

  • C#
  • C++
  • Rust
  • Elixir
  • Lua
  • Python
  • JavaScript
  • Java
  • TypeScript

auroraffxivplugin's People

Contributors

wolfcomp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

auroraffxivplugin's Issues

The crash is due to watcher triggering on ffxiv folder change and dirname stripping it

I put some logging in. Sorry for the Quick & Dirty instead of a proper pull request with a fix but I'm about to be unavailable for most of this coming week and I traced this down this afternoon so I thought I'd go ahead and report in case you wanted to fix it before I got to it.

        private void WatcherOnChanged(object sender, FileSystemEventArgs e)
        {
            if (e.FullPath.Contains("FFXIV_CHR") && !e.FullPath.Contains("\\log\\"))
            {
                string filepath = @"D:log.log";
                using (StreamWriter streamWriter = File.AppendText(filepath))
                {
                    streamWriter.WriteLine("file path: " + e.FullPath.ToString());
                    streamWriter.WriteLine("dir name: " + (new FileInfo(e.FullPath).DirectoryName));
                }
                ReadFiles(new FileInfo(e.FullPath).DirectoryName);
            }
        }

crash happens when log reads (added some linebreaks):

<snip>
file path: d:\Users\MarauderIIC\Documents\My Games\FINAL FANTASY XIV - A Realm Reborn\FFXIV_CHR<digits>\ADDON.DAT
dir name: d:\Users\MarauderIIC\Documents\My Games\FINAL FANTASY XIV - A Realm Reborn\FFXIV_CHR<digits>

file path: d:\Users\MarauderIIC\Documents\My Games\FINAL FANTASY XIV - A Realm Reborn\FFXIV_CHR<digits>\log
dir name: d:\Users\MarauderIIC\Documents\My Games\FINAL FANTASY XIV - A Realm Reborn\FFXIV_CHR<digits>

file path: d:\Users\MarauderIIC\Documents\My Games\FINAL FANTASY XIV - A Realm Reborn\FFXIV_CHR<digits>
dir name: d:\Users\MarauderIIC\Documents\My Games\FINAL FANTASY XIV - A Realm Reborn

file path: d:\Users\MarauderIIC\Documents\My Games\FINAL FANTASY XIV - A Realm Reborn\FFXIV_CHR<digits>
dir name: d:\Users\MarauderIIC\Documents\My Games\FINAL FANTASY XIV - A Realm Reborn

WatcherOnChanged() is occasionally triggered by the FFXIV_CHR directory itself updating, which causes DirectoryName to strip FFXIV_CHR from the path, which is what then causes ReadFiles to fail its extra folder.Contains() check, which then throws. The simplest fix, of course, is remove the (redundant?) check from WatcherOnChanged and return instead of throw in ReadFiles, or drop the check from ReadFiles.

Some more "correct" things are:

  • use FileInfo(e.FullPath).DirectoryName.Contains("FFXIV_CHR") in the check(s)
  • it should probably check only the last directory in the path instead of full path contain

Also the !e.FullPath.Contains("\\log\\") check does not work as intended when the log dir is updated instead of a file in the log dir, due to the trailing slash.

I'll send a PR if I get to fixing it later this week.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.