1. Leah Hanson
  2. haiku-dropbox-client

Commits

Leah Hanson  committed 0269099

stop expecting trailing whitespace in deltas

  • Participants
  • Parent commits b1fb479
  • Branches default

Comments (0)

Files changed (1)

File HaikuDropbox.cpp

View file
 int
 App::parse_command(BString command)
 {
-  if(command.Compare("RESET\n") == 0)
+  command.RemoveAll("\n"); //remove trailing whitespace
+  if(command.Compare("RESET") == 0)
   {
     printf("Burn Everything. 8D\n");
 
     //TODO: deal with Dropbox file paths being case-insensitive
     //which here means all lower case
     BString path;
-    command.CopyInto(path,7,command.FindFirst("\n") - 7);
+    command.CopyInto(path,7,command.Length() - 7);
 
     const char * pathstr = db_to_local_filepath(path.String()).String();
     BPath *bpath = new BPath(pathstr);
         {
           case B_ENTRY_CREATED:
           {
-            printf("CREATED FILE\n");
+            printf("CREATED NEW FILE\n");
             entry_ref ref;
             BPath path;
             const char * name;