Bug 51564 - Renaming a file in Quanta doesn't change its timestamp
Summary: Renaming a file in Quanta doesn't change its timestamp
Status: RESOLVED FIXED
Alias: None
Product: quanta
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: András Manţia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-06 11:11 UTC by Thibaut Cousin
Modified: 2002-12-06 12:13 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thibaut Cousin 2002-12-06 11:11:12 UTC
Version:           3.0 (using KDE 3.0.5)
Installed from:    SuSE
Compiler:          gcc version 3.2
OS:          Linux (i686) release 2.4.19-4GB

If I rename a file inside Quanta+, its timestamp is not changed. This causes the file NOT to be uploaded the next time I open the "Upload" dialog, because Quanta doesn't consider it as changed since last time... So I need to open a terminal and use the "touch" command on each file I renamed.

This means the upload feature of Quanta+ is not able to keep the local and remote copies of the site in sync.
Comment 1 András Manţia 2002-12-06 12:13:23 UTC
Subject: quanta/quanta/project

CVS commit by amantia: 

Detect renamed files, and select them when uploading.

CCMAIL: 51564-done@bugs.kde.org


  M +7 -1      project.cpp   1.74


--- quanta/quanta/project/project.cpp:1.73	Fri Nov 15 12:13:39 2002
@@ -743,14 +743,20 @@
     QDomElement el;
     QDomNodeList nl = dom.elementsByTagName("item");
     QString tmpString;
+    QString oldString;
     QString oldStr = QuantaCommon::qUrl(oldURL);
     QString newStr = QuantaCommon::qUrl(newURL);
     for (uint i = 0; i < nl.count(); i++ )
     {
       el = nl.item(i).toElement();
       tmpString = el.attribute("url");    
+      oldString = tmpString;
       tmpString = tmpString.replace(QRegExp(oldStr),newStr);
-      el.setAttribute("url",tmpString);
+      if (oldString != tmpString )
+      {
+        el.setAttribute("url",tmpString);
+        el.setAttribute("upload_time","");
+      }
     }
     oldURL = KURL();
     newURL = KURL();

Comment 2 András Manţia 2002-12-06 12:15:58 UTC
Subject: Re:  New: Renaming a file in Quanta doesn't change its timestamp

On 2002. December 06., Friday 12:11, you wrote:
>
> If I rename a file inside Quanta+, its timestamp is not changed. This
> causes the file NOT to be uploaded the next time I open the "Upload"
> dialog, because Quanta doesn't consider it as changed since last time... So
> I need to open a terminal and use the "touch" command on each file I
> renamed.

Hm, this is how the operating system behaves... Try to rename a file in a 
shell, mc or konqueror. The timestamp will not change. 

> This means the upload feature of Quanta+ is not able to keep the local and
> remote copies of the site in sync.

Fixed, Quanta now correctly detects the renamed files and selects them for 
upload. I don't know if this will get in 3.1 or not, but it will be in 3.1.1.

Andras