GithubHelp home page GithubHelp logo

Case Typo? about gallerist HOT 11 CLOSED

koraktor avatar koraktor commented on June 8, 2024
Case Typo?

from gallerist.

Comments (11)

koraktor avatar koraktor commented on June 8, 2024

This is not a typo. The directory was called Database in the version of Photos (and iPhoto IIRC) I tested this with.
In fact, I ensured to have the correct capitalization in all paths so it also works on case-sensitive file systems.

Maybe this is an old converted database?

Anyway, I think this should be fixed. So thanks for reporting.

from gallerist.

mro avatar mro commented on June 8, 2024

Maybe this is an old converted database?

indeed, yes.

from gallerist.

koraktor avatar koraktor commented on June 8, 2024

This might be caused by (undefined) behaviour of Dir.glob with File::FNM_CASEFOLD:

Dir.glob(path, File::FNM_CASEFOLD).first || path

What Ruby version are you using? Can you try another one?

from gallerist.

mro avatar mro commented on June 8, 2024

how strange, will try sunday.

from gallerist.

mro avatar mro commented on June 8, 2024
$ ruby --version
ruby 2.1.3p242 (2014-09-19 revision 47630) [x86_64-darwin15.0]
$ gem --version
2.5.1
$ gem list --local -d gallerist

*** LOCAL GEMS ***

gallerist (0.1.0)
    Author: Sebastian Staudt
    Homepage: https://github.com/koraktor/gallerist
    License: BSD
    Installed at: /Users/mro/.gem/ruby/2.1.3

    A web application to browse Apple Photos and iPhoto libraries
--------
Also:
$ ruby --version
ruby 2.0.0p643 (2015-02-25) [x86_64-darwin13.4.0]
$ ruby --version
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin13]
$ ruby --version
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]

from gallerist.

koraktor avatar koraktor commented on June 8, 2024

@mro Do the other Rubies show the same problem?

Additionally, can you try the code from master?

from gallerist.

mro avatar mro commented on June 8, 2024

@koraktor yes, the other rubies the same. My ruby gemish is a bit rusty, how would I try master?

from gallerist.

koraktor avatar koraktor commented on June 8, 2024

This should work:

$ git clone https://github.com/koraktor/gallerist
$ gallerist/bin/gallerist …

from gallerist.

mro avatar mro commented on June 8, 2024

no success yet:

$ git clone https://github.com/koraktor/gallerist
$ cd gallerist
$ git log -1 --pretty=oneline
57f2d1af87b7f466816e2911f83a923874692003 Update uglifier to 3.0
$ bundle install
$ bundle exec ruby bin/gallerist ~/Pictures/Fotos-Mediathek.photoslibrary
There’s no library at "/Users/.../Pictures/Fotos-Mediathek.photoslibrary". Is the path correct?
$ bundle exec ruby --version
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]

from gallerist.

koraktor avatar koraktor commented on June 8, 2024

Sorry for the very late response.

Sadly, I did not find a way to reproduce this. Apparently, Ruby’s behavior for FNM_CASEFOLD is depending on the systems libc implementation. So this might be even fixable by upgrading macOS (What version are you on, darwin15 is 10.11?).

Additionally, I added a patch for this in branch fix-dir-glob. Would you mind testing it?

git fetch origin
git checkout -b fix-dir-glob origin/fix-dir-glob

from gallerist.

mro avatar mro commented on June 8, 2024

still

(fix-dir-glob) $ bundle exec ruby bin/gallerist ~/Pictures/Fotos-Mediathek.photoslibrary
There’s no library at "/Users/xxx/Pictures/Fotos-Mediathek.photoslibrary". Is the path correct?

once I remove the capitalized softlink and keep the lowercase directory only.

But I'm perfectly fine with the workaround (the softlink). So don't bother as this seems to be me only having this issue.

~ $ ls -Ald ./Pictures/Fotos-Mediathek.photoslibrary/?atabase
lrwxr-xr-x  1 xxx  xxx    8  4 Jul 22:19 ./Pictures/Fotos-Mediathek.photoslibrary/Database -> database
drwxr-xr-x@ 2 xxx  xxx  510 29 Aug 21:08 ./Pictures/Fotos-Mediathek.photoslibrary/database

Thank you very much for your patience.

P.S.:

OSX 10.11.6 here.

~$ bundle exec ruby --version
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
~ $ otool -L /usr/lib/libc.dylib 
/usr/lib/libc.dylib:
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
	/usr/lib/system/libcache.dylib (compatibility version 1.0.0, current version 75.0.0)
	/usr/lib/system/libcommonCrypto.dylib (compatibility version 1.0.0, current version 60075.50.1)
	/usr/lib/system/libcompiler_rt.dylib (compatibility version 1.0.0, current version 62.0.0)
	/usr/lib/system/libcopyfile.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/system/libcorecrypto.dylib (compatibility version 1.0.0, current version 335.50.2)
	/usr/lib/system/libdispatch.dylib (compatibility version 1.0.0, current version 501.40.12)
	/usr/lib/system/libdyld.dylib (compatibility version 1.0.0, current version 360.22.0)
	/usr/lib/system/libkeymgr.dylib (compatibility version 1.0.0, current version 28.0.0)
	/usr/lib/system/liblaunch.dylib (compatibility version 1.0.0, current version 765.70.2)
	/usr/lib/system/libmacho.dylib (compatibility version 1.0.0, current version 875.1.0)
	/usr/lib/system/libquarantine.dylib (compatibility version 1.0.0, current version 80.0.0)
	/usr/lib/system/libremovefile.dylib (compatibility version 1.0.0, current version 41.0.0)
	/usr/lib/system/libsystem_asl.dylib (compatibility version 1.0.0, current version 323.50.1)
	/usr/lib/system/libsystem_blocks.dylib (compatibility version 1.0.0, current version 65.0.0)
	/usr/lib/system/libsystem_c.dylib (compatibility version 1.0.0, current version 1082.60.1)
	/usr/lib/system/libsystem_configuration.dylib (compatibility version 1.0.0, current version 802.40.13)
	/usr/lib/system/libsystem_coreservices.dylib (compatibility version 1.0.0, current version 19.2.0)
	/usr/lib/system/libsystem_coretls.dylib (compatibility version 1.0.0, current version 83.40.5)
	/usr/lib/system/libsystem_dnssd.dylib (compatibility version 1.0.0, current version 625.60.5)
	/usr/lib/system/libsystem_info.dylib (compatibility version 1.0.0, current version 477.50.4)
	/usr/lib/system/libsystem_kernel.dylib (compatibility version 1.0.0, current version 3248.73.11)
	/usr/lib/system/libsystem_m.dylib (compatibility version 1.0.0, current version 3105.0.0)
	/usr/lib/system/libsystem_malloc.dylib (compatibility version 1.0.0, current version 67.40.1)
	/usr/lib/system/libsystem_network.dylib (compatibility version 1.0.0, current version 583.50.1)
	/usr/lib/system/libsystem_networkextension.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/system/libsystem_notify.dylib (compatibility version 1.0.0, current version 150.40.1)
	/usr/lib/system/libsystem_platform.dylib (compatibility version 1.0.0, current version 74.40.2)
	/usr/lib/system/libsystem_pthread.dylib (compatibility version 1.0.0, current version 138.10.4)
	/usr/lib/system/libsystem_sandbox.dylib (compatibility version 1.0.0, current version 460.60.4)
	/usr/lib/system/libsystem_secinit.dylib (compatibility version 1.0.0, current version 20.0.0)
	/usr/lib/system/libsystem_trace.dylib (compatibility version 1.0.0, current version 201.10.3)
	/usr/lib/system/libunc.dylib (compatibility version 1.0.0, current version 29.0.0)
	/usr/lib/system/libunwind.dylib (compatibility version 1.0.0, current version 35.3.0)
	/usr/lib/system/libxpc.dylib (compatibility version 1.0.0, current version 765.70.2)
~ $ otool -L /usr/lib/libc++.dylib 
/usr/lib/libc++.dylib:
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
	/usr/lib/libc++abi.dylib (compatibility version 1.0.0, current version 125.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1225.0.0)

from gallerist.

Related Issues (7)

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.