<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>450125</bug_id>
          
          <creation_ts>2022-02-13 05:39:33 +0000</creation_ts>
          <short_desc>When extracting ZIPs with empty folders, access time is set to future (year 4443302 or 4444523)</short_desc>
          <delta_ts>2022-02-21 16:10:06 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>ark</product>
          <component>plugins</component>
          <version>21.12.2</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="nyanpasu64">nyanpasu64</reporter>
          <assigned_to name="Ragnar Thomsen">rthomsen6</assigned_to>
          <cc>2wxsy58236r3</cc>
    
    <cc>aacid</cc>
    
    <cc>bugseforuns</cc>
    
    <cc>elvis.angelaccio</cc>
    
    <cc>nate</cc>
          
          <cf_commitlink>https://invent.kde.org/utilities/ark/commit/229b9ce8372014469443de93a193c584e3936509</cf_commitlink>
          <cf_versionfixedin>21.12.3</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2104029</commentid>
    <comment_count>0</comment_count>
    <who name="nyanpasu64">nyanpasu64</who>
    <bug_when>2022-02-13 05:39:33 +0000</bug_when>
    <thetext>SUMMARY
When I extract a ZIP, and a folder contains no files (is empty or only contains folders), the folder&apos;s access time is set in the future.

(4444523-03-02 04:58:56.000000000 -0800)

STEPS TO REPRODUCE
1. Download the attached .zip file.
2. Open it in Ark and extract all. Alternatively, extract it using Dolphin&apos;s &quot;Extract archive here, autodetect subfolder&quot;.
3. Run `stat folders-only`. Optionally check `folders-only/empty` and `folders-only/has-files` as well.
4. Try viewing the folder in Wine.

OBSERVED RESULT
When extracting folders without files inside, their access time is in the future. If extracted in Ark, the access time is 4443302-06-30 03:35:44.000000000 -0700. If extracted using Dolphin, the access time is 4444521-01-12 12:13:04.000000000 -0800.

Wine applications cannot access the contents of folders with access times past 2038, failing with errno 75 EOVERFLOW. I think this is a Wine bug.

EXPECTED RESULT
The access time of folders without files inside is reasonable.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.24.0
KDE Frameworks Version: 5.90.0
Qt Version: 5.15.2
Kernel Version: 5.16.8-zen1-1-zen (64-bit)
Graphics Platform: X11
Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor
Memory: 15.6 GiB of RAM
Graphics Processor: NVIDIA GeForce GT 730/PCIe/SSE2

ADDITIONAL INFORMATION
I think this does not happen when extracting .tar.gz or .7z files.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2104089</commentid>
    <comment_count>1</comment_count>
    <who name="Albert Astals Cid">aacid</who>
    <bug_when>2022-02-13 11:36:52 +0000</bug_when>
    <thetext>Please attach the zip file</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2104090</commentid>
    <comment_count>2</comment_count>
      <attachid>146666</attachid>
    <who name="nyanpasu64">nyanpasu64</who>
    <bug_when>2022-02-13 11:39:35 +0000</bug_when>
    <thetext>Created attachment 146666
.zip file containing folders with no files</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2104172</commentid>
    <comment_count>3</comment_count>
    <who name="Albert Astals Cid">aacid</who>
    <bug_when>2022-02-13 18:23:21 +0000</bug_when>
    <thetext>Works fine for me

ls -lrt folders-only/
total 8
drwxr-xr-x 2 tsdgeos tsdgeos 4096 Feb  5 14:58 has-files
drwxr-xr-x 2 tsdgeos tsdgeos 4096 Feb  5 14:58 empty</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2104173</commentid>
    <comment_count>4</comment_count>
    <who name="Bug Janitor Service">bug-janitor</who>
    <bug_when>2022-02-13 18:27:06 +0000</bug_when>
    <thetext>A possibly relevant merge request was started @ https://invent.kde.org/utilities/ark/-/merge_requests/100</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2104174</commentid>
    <comment_count>5</comment_count>
    <who name="Albert Astals Cid">aacid</who>
    <bug_when>2022-02-13 18:27:25 +0000</bug_when>
    <thetext>(In reply to Albert Astals Cid from comment #3)
&gt; Works fine for me
&gt; 
&gt; ls -lrt folders-only/
&gt; total 8
&gt; drwxr-xr-x 2 tsdgeos tsdgeos 4096 Feb  5 14:58 has-files
&gt; drwxr-xr-x 2 tsdgeos tsdgeos 4096 Feb  5 14:58 empty

Ignore me i didn&apos;t realize it was about access time</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2104250</commentid>
    <comment_count>6</comment_count>
    <who name="Patrick Silva">bugseforuns</who>
    <bug_when>2022-02-14 01:00:30 +0000</bug_when>
    <thetext>duplicate of bug 424740</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2104352</commentid>
    <comment_count>7</comment_count>
    <who name="Albert Astals Cid">aacid</who>
    <bug_when>2022-02-14 10:01:42 +0000</bug_when>
    <thetext>Let&apos;s duplicate it the other way around given how the fix i prepared refers to this bug number and not the other one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2104354</commentid>
    <comment_count>8</comment_count>
    <who name="Albert Astals Cid">aacid</who>
    <bug_when>2022-02-14 10:02:14 +0000</bug_when>
    <thetext>*** Bug 424740 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2106843</commentid>
    <comment_count>9</comment_count>
    <who name="Albert Astals Cid">aacid</who>
    <bug_when>2022-02-21 13:20:13 +0000</bug_when>
    <thetext>Git commit 229b9ce8372014469443de93a193c584e3936509 by Albert Astals Cid.
Committed on 13/02/2022 at 18:26.
Pushed by aacid into branch &apos;release/21.12&apos;.

zip: Fix setting un-initialized access time

M  +3    -1    plugins/libzipplugin/libzipplugin.cpp

https://invent.kde.org/utilities/ark/commit/229b9ce8372014469443de93a193c584e3936509</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>146666</attachid>
            <date>2022-02-13 11:39:35 +0000</date>
            <delta_ts>2022-02-13 11:39:35 +0000</delta_ts>
            <desc>.zip file containing folders with no files</desc>
            <filename>folders-only.zip</filename>
            <type>application/zip</type>
            <size>498</size>
            <attacher name="nyanpasu64">nyanpasu64</attacher>
            
              <data encoding="base64">UEsDBBQAAAAAAFp3RVQAAAAAAAAAAAAAAAANAAAAZm9sZGVycy1vbmx5L1BLAwQUAAAAAABad0VU
AAAAAAAAAAAAAAAAFwAAAGZvbGRlcnMtb25seS9oYXMtZmlsZXMvUEsDBBQAAAAAAOxxRFQAAAAA
AAAAAAAAAAAfAAAAZm9sZGVycy1vbmx5L2hhcy1maWxlcy9maWxlLnR4dFBLAwQUAAAAAABad0VU
AAAAAAAAAAAAAAAAEwAAAGZvbGRlcnMtb25seS9lbXB0eS9QSwECPwMUAAAAAABad0VUAAAAAAAA
AAAAAAAADQAAAAAAAAAAAAAA7UEAAAAAZm9sZGVycy1vbmx5L1BLAQI/AxQAAAAAAFp3RVQAAAAA
AAAAAAAAAAAXAAAAAAAAAAAAAADtQSsAAABmb2xkZXJzLW9ubHkvaGFzLWZpbGVzL1BLAQI/AxQA
AAAAAOxxRFQAAAAAAAAAAAAAAAAfAAAAAAAAAAAAAACkgWAAAABmb2xkZXJzLW9ubHkvaGFzLWZp
bGVzL2ZpbGUudHh0UEsBAj8DFAAAAAAAWndFVAAAAAAAAAAAAAAAABMAAAAAAAAAAAAAAO1BnQAA
AGZvbGRlcnMtb25seS9lbXB0eS9QSwUGAAAAAAQABAAOAQAAzgAAAAAA
</data>

          </attachment>
      

    </bug>

</bugzilla>