LycheeOrg / Lychee

A great looking and easy-to-use photo-management-system you can run on your server, to manage and share photos.
https://lycheeorg.github.io/
MIT License
3.42k stars 303 forks source link

Lychee server import ignores directories with `[` in the name #951

Closed williamhaley closed 2 years ago

williamhaley commented 3 years ago

Detailed description of the problem

When running Import from Server using fairly vanilla/default settings, it seems my directory named 2021_02_26[First day on campus] is not handled properly. An album is created, but it contains no photos.

Steps to reproduce the issue

  1. Use the default docker-compose example to set up a local server
  2. Use rsync to copy some sample images to ./lychee/uploads/import/ (Note: One of the folders in photos is named 2021_02_26[First day on campus])

    rsync -avr ~/photos/ ./lychee/uploads/import/
  3. In Lychee go to Add -> Import from Server -> use the default settings and run the import Screen Shot 2021-03-25 at 8 40 11 PM
  4. An album should be created titled 2021_02_26[First day on campus], but it will be empty Screen Shot 2021-03-25 at 8 48 32 PM
  5. Rename the problem directory. Replace [ with spaces in the name
  6. Try importing again. Don't worry about duplicates. Just use default settings
  7. Now the photos should be imported to the album where the [ was removed from the name Screen Shot 2021-03-25 at 8 53 02 PM

Output of the diagnostics [REQUIRED]

    Diagnostics
    -----------
    Warning: Dropbox import not working. dropbox_key is empty.
    Warning: You may experience problems when uploading a photo of large size. Take a look in the FAQ for details.

    System Information
    ------------------
    Lychee Version (git):            No git data found.
    DB Version:                      4.2.2

    composer install:                --no-dev
    APP_ENV:                         production
    APP_DEBUG:                       false

    System:                          Linux
    PHP Version:                     7.4
    Max uploaded file size:          20M
    Max post size:                   100M
    MySQL Version:                   10.5.9-MariaDB-1:10.5.9+maria~focal

    Imagick:                         1
    Imagick Active:                  1
    Imagick Version:                 1691
    GD Version:                      2.3.0

    Config Information
    ------------------
    version:                         040202
    check_for_updates:               0
    sorting_Photos_col:              takestamp
    sorting_Photos_order:            ASC
    sorting_Albums_col:              max_takestamp
    sorting_Albums_order:            ASC
    imagick:                         1
    skip_duplicates:                 0
    small_max_width:                 0
    small_max_height:                360
    medium_max_width:                1920
    medium_max_height:               1080
    lang:                            en
    layout:                          1
    image_overlay:                   1
    image_overlay_type:              desc
    default_license:                 none
    compression_quality:             90
    full_photo:                      1
    delete_imported:                 0
    Mod_Frame:                       1
    Mod_Frame_refresh:               30
    thumb_2x:                        1
    small_2x:                        1
    medium_2x:                       1
    landing_page_enable:             0
    landing_owner:                   John Smith
    landing_title:                   John Smith
    landing_subtitle:                Cats, Dogs & Humans Photography
    landing_facebook:                https://www.facebook.com/JohnSmith
    landing_flickr:                  https://www.flickr.com/JohnSmith
    landing_twitter:                 https://www.twitter.com/JohnSmith
    landing_instagram:               https://instagram.com/JohnSmith
    landing_youtube:                 https://www.youtube.com/JohnSmith
    landing_background:              dist/cat.jpg
    site_title:                      Lychee v4
    site_copyright_enable:           1
    site_copyright_begin:            2019
    site_copyright_end:              2019
    additional_footer_text:          
    display_social_in_gallery:       0
    public_search:                   0
    SL_enable:                       0
    SL_for_admin:                    0
    public_recent:                   0
    recent_age:                      1
    public_starred:                  0
    downloadable:                    0
    photos_wraparound:               1
    map_display:                     0
    zip64:                           1
    map_display_public:              0
    map_provider:                    Wikimedia
    force_32bit_ids:                 0
    map_include_subalbums:           0
    update_check_every_days:         3
    has_exiftool:                    1
    share_button_visible:            0
    import_via_symlink:              0
    has_ffmpeg:                      1
    location_decoding:               0
    location_decoding_timeout:       30
    location_show:                   1
    location_show_public:            0
    rss_enable:                      0
    rss_recent_days:                 7
    rss_max_items:                   100
    prefer_available_xmp_metadata:   0
    editor_enabled:                  1
    lossless_optimization:           0
    swipe_tolerance_x:               150
    swipe_tolerance_y:               250
    local_takestamp_video_formats:   .avi|.mov
    log_max_num_line:                1000
    unlock_password_photos_with_url_param: 0
    nsfw_visible:                    1
    nsfw_blur:                       0
    nsfw_warning:                    0
    nsfw_warning_admin:              0
    map_display_direction:           1
    album_subtitle_type:             oldstyle
    upload_processing_limit:         4

Browser and system

Firefox 86.0.1 (64-bit) on macOS 11.2.3 (20D91)

ildyria commented 3 years ago

Steps to reproduce the issue

  1. Use the default docker-compose example to set up a local server

This is not the default. This is the default: https://hub.docker.com/r/lycheeorg/lychee

Anyway, I do agree this is a bug. However I don't have the time to fix it, maybe @kamil4 can take a look. :confused:

williamhaley commented 3 years ago

Whoops, you're right. That was not the correct docker-compose file. Sorry! I think I got confused when I was compiling my notes and the one I linked was the first Google result for "lychee docker-compose" for me.

ildyria commented 3 years ago

No worries we have @alex-phillips here working on LinuxServer.io :)