<?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>329438</bug_id>
          
          <creation_ts>2013-12-30 19:52:29 +0000</creation_ts>
          <short_desc>Rename function with Date &amp; Time does not work with NTFS</short_desc>
          <delta_ts>2019-07-02 20:19:14 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>digikam</product>
          <component>AdvancedRename-Import</component>
          <version>6.0.0</version>
          <rep_platform>Microsoft Windows</rep_platform>
          <op_sys>Microsoft Windows</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="Jean-Pierre">jpr473</reporter>
          <assigned_to name="Digikam Developers">digikam-bugs-null</assigned_to>
          <cc>bjoernv</cc>
    
    <cc>caulier.gilles</cc>
    
    <cc>kinnalru</cc>
    
    <cc>metzpinguin</cc>
          
          <cf_commitlink>https://commits.kde.org/digikam/2d8d7be73d4b81ed298cd21edae2a7350128fb48</cf_commitlink>
          <cf_versionfixedin>6.2.0</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1421698</commentid>
    <comment_count>0</comment_count>
    <who name="Jean-Pierre">jpr473</who>
    <bug_when>2013-12-30 19:52:29 +0000</bug_when>
    <thetext>Renaming with date time ISO format does not work. It fails on a single file and multiple files as well. Rename attemps with camera type worked. On linux Ubuntu it works fine but not on this version of Digikam &amp; KDE (4.10.2)

Result is a pop-up windows with error:  &quot;Could not rename file C:/such and such folder &amp; directory...&quot;

Renaming with Time &amp; Date Standard format worked but not the ISO format.

Thank you,

Reproducible: Always

Steps to Reproduce:
1. Select picture to rename
2. Invoke Rename function
3. Click on Date &amp; Time / Select ISO format.
Actual Results:  
Failed to rename

Expected Results:  
Rename to ISO format.

I am running Digikam on a WinXP machine</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1422759</commentid>
    <comment_count>1</comment_count>
    <who name="Samoilenko Yuri">kinnalru</who>
    <bug_when>2014-01-04 21:43:55 +0000</bug_when>
    <thetext>As far as I know ISO format using such timestamp: &quot;YYYY-MM-DDTHH:MM:SS&quot;, but symbol &quot;:&quot; is not allowed for ntfs/windows.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1494151</commentid>
    <comment_count>2</comment_count>
    <who name="">caulier.gilles</who>
    <bug_when>2015-01-25 11:43:07 +0000</bug_when>
    <thetext>Git commit 7f3459d55dd453f257ece35398175bba22ea4109 by Gilles Caulier.
Committed on 25/01/2015 at 11:39.
Pushed by cgilles into branch &apos;master&apos;.

Apply patch #90637 from Maik Qualmann to fix image renaming settings rules in Import Tool to work properly while downloading.
Related: bug 342996, bug 314441, bug 307253, bug 342430
FIXED-IN: 4.7.0

M  +3    -1    NEWS
M  +2    -2    utilities/importui/backend/cameracontroller.cpp
M  +67   -44   utilities/importui/main/importui.cpp
M  +1    -0    utilities/importui/main/importui.h
M  +5    -0    utilities/importui/views/importview.cpp
M  +1    -0    utilities/importui/views/importview.h

http://commits.kde.org/digikam/7f3459d55dd453f257ece35398175bba22ea4109</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1494182</commentid>
    <comment_count>3</comment_count>
    <who name="">caulier.gilles</who>
    <bug_when>2015-01-25 14:01:06 +0000</bug_when>
    <thetext>Git commit 0201e6fc8549ac849029daf36eaeadd6ebb4d4ae by Gilles Caulier.
Committed on 25/01/2015 at 13:58.
Pushed by cgilles into branch &apos;frameworks&apos;.

Backport commit #7f3459d55dd453f257ece35398175bba22ea4109 from git/master to frameworks branch.
Related: bug 342996, bug 314441, bug 307253, bug 342430

M  +3    -3    utilities/importui/backend/cameracontroller.cpp
M  +74   -50   utilities/importui/main/importui.cpp
M  +1    -0    utilities/importui/main/importui.h
M  +5    -0    utilities/importui/views/importview.cpp
M  +1    -0    utilities/importui/views/importview.h

http://commits.kde.org/digikam/0201e6fc8549ac849029daf36eaeadd6ebb4d4ae</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1507425</commentid>
    <comment_count>4</comment_count>
    <who name="">caulier.gilles</who>
    <bug_when>2015-03-26 07:00:12 +0000</bug_when>
    <thetext>digiKam 4.7.0 for Windows is available :

http://download.kde.org/stable/digikam/digiKam-installer-4.7.0-1-win32.exe.mirrorlist

Please test and report.

Thanks in advance

Gilles Caulier</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1530397</commentid>
    <comment_count>5</comment_count>
    <who name="">caulier.gilles</who>
    <bug_when>2015-07-06 07:38:03 +0000</bug_when>
    <thetext>digiKam 4.11.0 Windows installer is available for download :

http://download.kde.org/stable/digikam/digiKam-installer-4.11.0-win32.exe.mirrorlist</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1600068</commentid>
    <comment_count>6</comment_count>
    <who name="">caulier.gilles</who>
    <bug_when>2016-06-09 15:39:48 +0000</bug_when>
    <thetext>New digiKam 5.0.0-beta7 installer for Windows is available for testing :

https://drive.google.com/open?id=0B7yq-xFihT0_SzhxVzF1RDhPbFE

Please report if problem remain with this version.

Thanks in advance

Gilles Caulier</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1605272</commentid>
    <comment_count>7</comment_count>
    <who name="">caulier.gilles</who>
    <bug_when>2016-07-04 20:09:47 +0000</bug_when>
    <thetext>This file still valid using digiKam 5.0.0 ?

Gilles Caulier</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1641656</commentid>
    <comment_count>8</comment_count>
    <who name="">caulier.gilles</who>
    <bug_when>2016-11-25 06:56:38 +0000</bug_when>
    <thetext>This problem still reproducible using last DK 5.4.0 bundle ?

https://drive.google.com/drive/folders/0BzeiVr-byqt5Y0tIRWVWlRJenM

Gilles Caulier</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1745628</commentid>
    <comment_count>9</comment_count>
    <who name="Maik Qualmann">metzpinguin</who>
    <bug_when>2018-04-15 08:12:44 +0000</bug_when>
    <thetext>Git commit 2d8d7be73d4b81ed298cd21edae2a7350128fb48 by Maik Qualmann.
Committed on 15/04/2018 at 08:10.
Pushed by mqualmann into branch &apos;master&apos;.

we always replace the colon to avoid problems with Windows file systems
Related: bug 391312
FIXED-IN: 6.0.0

M  +2    -1    NEWS
M  +0    -6    core/libs/album/albumpropsedit.cpp
M  +1    -5    core/utilities/advancedrename/advancedrenamemanager.cpp

https://commits.kde.org/digikam/2d8d7be73d4b81ed298cd21edae2a7350128fb48</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1772283</commentid>
    <comment_count>10</comment_count>
    <who name="">bjoernv</who>
    <bug_when>2018-08-16 18:36:32 +0000</bug_when>
    <thetext>I think, it would be better to replace the colon character unconditionally, not only on the Windows platform. Linux users often want to share photos with Windows users or want to save photos on a medium which is also accessed by Windows computers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1772286</commentid>
    <comment_count>11</comment_count>
    <who name="Maik Qualmann">metzpinguin</who>
    <bug_when>2018-08-16 19:00:29 +0000</bug_when>
    <thetext>The current implementation already looks different. It queries the file system, whether it is a FAT* or NTFS* file system. It will also replace a whole host of other characters that Windows does not support. In this way, Linux users can continue to use a colon. If from Linux has special characters in the file name and it is to be copied to a Windows file system, then an export tool must correct the file names.

Maik</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1772902</commentid>
    <comment_count>12</comment_count>
    <who name="">bjoernv</who>
    <bug_when>2018-08-19 20:41:55 +0000</bug_when>
    <thetext>The strategy is good, but does not reliable work on Linux.

    if (sysType.contains(QLatin1String(&quot;FAT&quot;)) ||
        sysType.contains(QLatin1String(&quot;NTFS&quot;)))
    {
        QRegExp regexp(QLatin1String(&quot;[?*&lt;&gt;,\\+:=/\&quot;;|]&quot;));
        newName.replace(regexp, QLatin1String(&quot;_&quot;));
    }

The current code tests for the filesystems &quot;FAT&quot; and &quot;NTFS&quot;. On Linux &quot;FAT&quot; filesystems show the name &quot;vfat&quot; in QStorageInfo. NTFS shows as &quot;fuseblk&quot; in QStorageInfo, if NTFS is mounted with &quot;ntfs-3g&quot; like most distributions do. Unfortunately &quot;fuseblk&quot; does not necessarily mean, the it is a NTFS filesystem. There are many FUSE filesystems.

&quot;vfat&quot; is OK, because &quot;FAT&quot; matches the uppercase word &quot;VFAT&quot;. For NTFS (ntfs-3g) we need a solution. (Hint: &quot;lsblk -no name,fstype&quot; detects NTFS correctly - see https://unix.stackexchange.com/questions/332712/how-do-i-find-out-what-filesystem-fuse-is-using)

I also do not understand, why &quot;/&quot; is not filtered on Linux. \ / : * ? &quot; &lt; &gt; | are legal characters in Linux filenames (only / and NUL are illegal), but will cause problems anyway, e.g. in the shell.

ReFS and exFAT are also not considered by the code.

The easiest solution is still to filter all possible illegal characters unconditionally.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1772921</commentid>
    <comment_count>13</comment_count>
    <who name="Maik Qualmann">metzpinguin</who>
    <bug_when>2018-08-20 06:40:51 +0000</bug_when>
    <thetext>Generally removing all characters that are not allowed under Windows is not the right solution. Then we have the next bug report from a Linux user who has always used the colon in his file name. At the moment I tend to put &quot;fuseblk&quot; on the blacklist too. The slash &quot;/&quot; is already internally filtered, it can not be entered in the input field, filtering in the result string is not necessary.

Maik</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1773115</commentid>
    <comment_count>14</comment_count>
    <who name="">bjoernv</who>
    <bug_when>2018-08-20 19:58:30 +0000</bug_when>
    <thetext>(In reply to Maik Qualmann from comment #13)
&gt; Then we have the next bug report from a Linux user who
&gt; has always used the colon in his file name. [...]The slash &quot;/&quot; is already 
&gt; internally filtered, it can not be entered in the input field, filtering
&gt; in the result string is not necessary.

I think, not much people will use characters like &quot;:&quot; and &quot;*&quot; for filenames, but those characters can be part of the variables, e.g. EXIF variables. I searched for this bug report, because I wanted to insert date+time in the filename, because this makes it possible to sort photos easily by date/time. Unfortunately this does not work with Digikam 5.9.0 + Linux + VFAT media, because [meta:Exif.Image.DateTime] produces filenames with colons (e.g. 2016:12:27 18:54:23.jpg)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1774811</commentid>
    <comment_count>15</comment_count>
    <who name="">caulier.gilles</who>
    <bug_when>2018-08-28 19:06:35 +0000</bug_when>
    <thetext>The Windows installer have been recompiled with last changes from source code and is available here for testing :

https://files.kde.org/digikam/

Take a care : it&apos;s a beta release. Make a database backup before to test.

Gilles Caulier</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>