wolpi / prim-ftpd

FTP server app for android
Other
580 stars 78 forks source link

Fix typo in logging #355

Closed lmagyar closed 3 weeks ago

lmagyar commented 3 weeks ago

This is how all other FileSystemView writes out the trace info.

wolpi commented 3 weeks ago

I like the old code more because:

In (some of) other impls both paths are logged (the passed in one and the absolute one). E.g. in SAF (here it overrides the paramter which I often avoid):

        logger.trace("getFile({})", file);

        file = absolute(file);
        logger.trace("  getFile(abs: {})", file);

and Virtual:

        String absoluteVirtualPath = absolute(file);
        logger.debug("getFile '{}', absolute: '{}'", file, absoluteVirtualPath);
lmagyar commented 3 weeks ago

I agree, reverted. But the old code has a bug, it logs file instead of abs, so I fixed that.

And made a separate commit (can be reverted if you don't like it), where I changed all other getFile implementations to not change passed in file parameter, but use a new String abs.

wolpi commented 3 weeks ago

Nice to clean that up